summaryrefslogtreecommitdiffstats
path: root/lld/test/wasm/data-layout.ll
diff options
context:
space:
mode:
Diffstat (limited to 'lld/test/wasm/data-layout.ll')
-rw-r--r--lld/test/wasm/data-layout.ll17
1 files changed, 16 insertions, 1 deletions
diff --git a/lld/test/wasm/data-layout.ll b/lld/test/wasm/data-layout.ll
index c4f69241bad..ece5f20dca8 100644
--- a/lld/test/wasm/data-layout.ll
+++ b/lld/test/wasm/data-layout.ll
@@ -16,7 +16,10 @@ target triple = "wasm32-unknown-unknown-wasm"
; RUN: wasm-ld -no-gc-sections --check-signatures --allow-undefined -o %t.wasm %t.o %t.hello.o
; RUN: obj2yaml %t.wasm | FileCheck %s
-; CHECK: - Type: GLOBAL
+; CHECK: - Type: MEMORY
+; CHECK-NEXT: Memories:
+; CHECK-NEXT: - Initial: 0x00000002
+; CHECK-NEXT: - Type: GLOBAL
; CHECK-NEXT: Globals:
; CHECK-NEXT: - Index: 0
; CHECK-NEXT: Type: I32
@@ -54,6 +57,18 @@ target triple = "wasm32-unknown-unknown-wasm"
; CHECK-NEXT: - Type: CUSTOM
+; RUN: wasm-ld -no-gc-sections --check-signatures --allow-undefined \
+; RUN: --initial-memory=131072 --max-memory=131072 -o %t_max.wasm %t.o \
+; RUN: %t.hello.o
+; RUN: obj2yaml %t_max.wasm | FileCheck %s -check-prefix=CHECK-MAX
+
+; CHECK-MAX: - Type: MEMORY
+; CHECK-MAX-NEXT: Memories:
+; CHECK-MAX-NEXT: - Flags: [ HAS_MAX ]
+; CHECK-MAX-NEXT: Initial: 0x00000002
+; CHECK-MAX-NEXT: Maximum: 0x00000002
+
+
; RUN: wasm-ld --check-signatures --relocatable -o %t_reloc.wasm %t.o %t.hello.o
; RUN: obj2yaml %t_reloc.wasm | FileCheck %s -check-prefix=RELOC
OpenPOWER on IntegriCloud