[lld] r354397 - [WebAssembly] Update MC for bulk memory
Thomas Lively via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 19 14:56:20 PST 2019
Author: tlively
Date: Tue Feb 19 14:56:19 2019
New Revision: 354397
URL: http://llvm.org/viewvc/llvm-project?rev=354397&view=rev
Log:
[WebAssembly] Update MC for bulk memory
Summary:
Rename MemoryIndex to InitFlags and implement logic for determining
data segment layout in ObjectYAML and MC. Also adds a "passive" flag
for the .section assembler directive although this cannot be assembled
yet because the assembler does not support data sections.
Reviewers: sbc100, aardappel, aheejin, dschuff
Subscribers: jgravelle-google, hiraditya, sunfish, rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57938
Modified:
lld/trunk/test/wasm/call-indirect.ll
lld/trunk/test/wasm/comdats.ll
lld/trunk/test/wasm/data-layout.ll
lld/trunk/test/wasm/gc-sections.ll
lld/trunk/test/wasm/init-fini.ll
lld/trunk/test/wasm/local-symbols.ll
lld/trunk/test/wasm/locals-duplicate.test
lld/trunk/test/wasm/lto/used.ll
lld/trunk/test/wasm/many-functions.ll
lld/trunk/test/wasm/relocatable.ll
lld/trunk/test/wasm/shared.ll
lld/trunk/test/wasm/weak-symbols.ll
Modified: lld/trunk/test/wasm/call-indirect.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/call-indirect.ll?rev=354397&r1=354396&r2=354397&view=diff
==============================================================================
--- lld/trunk/test/wasm/call-indirect.ll (original)
+++ lld/trunk/test/wasm/call-indirect.ll Tue Feb 19 14:56:19 2019
@@ -154,7 +154,7 @@ define void @call_ptr(i64 (i64)* %arg) {
; CHECK-NEXT: - Type: DATA
; CHECK-NEXT: Segments:
; CHECK-NEXT: - SectionOffset: 7
-; CHECK-NEXT: MemoryIndex: 0
+; CHECK-NEXT: InitFlags: 0
; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 1024
Modified: lld/trunk/test/wasm/comdats.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/comdats.ll?rev=354397&r1=354396&r2=354397&view=diff
==============================================================================
--- lld/trunk/test/wasm/comdats.ll (original)
+++ lld/trunk/test/wasm/comdats.ll Tue Feb 19 14:56:19 2019
@@ -92,7 +92,7 @@ entry:
; CHECK-NEXT: - Type: DATA
; CHECK-NEXT: Segments:
; CHECK-NEXT: - SectionOffset: 7
-; CHECK-NEXT: MemoryIndex: 0
+; CHECK-NEXT: InitFlags: 0
; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 1024
Modified: lld/trunk/test/wasm/data-layout.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/data-layout.ll?rev=354397&r1=354396&r2=354397&view=diff
==============================================================================
--- lld/trunk/test/wasm/data-layout.ll (original)
+++ lld/trunk/test/wasm/data-layout.ll Tue Feb 19 14:56:19 2019
@@ -37,20 +37,20 @@ target triple = "wasm32-unknown-unknown"
; CHECK: - Type: DATA
; CHECK-NEXT: Segments:
; CHECK-NEXT: - SectionOffset: 7
-; CHECK-NEXT: MemoryIndex: 0
+; CHECK-NEXT: InitFlags: 0
; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 1024
; CHECK-NEXT: Content: '0100000000000000000000000000000003000000000000002804000024040000'
; CHECK-NEXT: - SectionOffset: 45
-; CHECK-NEXT: MemoryIndex: 0
+; CHECK-NEXT: InitFlags: 0
; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 1056
; CHECK-NEXT: Content: '0000000000000000'
; CHECK-NEXT: - SectionOffset: 59
-; CHECK-NEXT: MemoryIndex: 0
-; CHECK-NEXT: Offset:
+; CHECK-NEXT: InitFlags: 0
+; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 1064
; CHECK-NEXT: Content: 68656C6C6F0A00
@@ -93,37 +93,37 @@ target triple = "wasm32-unknown-unknown"
; RELOC-NEXT: Addend: 4
; RELOC-NEXT: Segments:
; RELOC-NEXT: - SectionOffset: 6
-; RELOC-NEXT: MemoryIndex: 0
+; RELOC-NEXT: InitFlags: 0
; RELOC-NEXT: Offset:
; RELOC-NEXT: Opcode: I32_CONST
; RELOC-NEXT: Value: 0
; RELOC-NEXT: Content: '01000000'
; RELOC-NEXT: - SectionOffset: 15
-; RELOC-NEXT: MemoryIndex: 0
+; RELOC-NEXT: InitFlags: 0
; RELOC-NEXT: Offset:
; RELOC-NEXT: Opcode: I32_CONST
; RELOC-NEXT: Value: 16
; RELOC-NEXT: Content: '03000000'
; RELOC-NEXT: - SectionOffset: 24
-; RELOC-NEXT: MemoryIndex: 0
+; RELOC-NEXT: InitFlags: 0
; RELOC-NEXT: Offset:
; RELOC-NEXT: Opcode: I32_CONST
; RELOC-NEXT: Value: 24
; RELOC-NEXT: Content: '28000000'
; RELOC-NEXT: - SectionOffset: 33
-; RELOC-NEXT: MemoryIndex: 0
-; RELOC-NEXT: Offset:
+; RELOC-NEXT: InitFlags: 0
+; RELOC-NEXT: Offset:
; RELOC-NEXT: Opcode: I32_CONST
; RELOC-NEXT: Value: 28
; RELOC-NEXT: Content: '0000000000000000'
; RELOC-NEXT: - SectionOffset: 46
-; RELOC-NEXT: MemoryIndex: 0
-; RELOC-NEXT: Offset:
+; RELOC-NEXT: InitFlags: 0
+; RELOC-NEXT: Offset:
; RELOC-NEXT: Opcode: I32_CONST
; RELOC-NEXT: Value: 36
; RELOC-NEXT: Content: '20000000'
; RELOC-NEXT: - SectionOffset: 55
-; RELOC-NEXT: MemoryIndex: 0
+; RELOC-NEXT: InitFlags: 0
; RELOC-NEXT: Offset:
; RELOC-NEXT: Opcode: I32_CONST
; RELOC-NEXT: Value: 40
Modified: lld/trunk/test/wasm/gc-sections.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/gc-sections.ll?rev=354397&r1=354396&r2=354397&view=diff
==============================================================================
--- lld/trunk/test/wasm/gc-sections.ll (original)
+++ lld/trunk/test/wasm/gc-sections.ll Tue Feb 19 14:56:19 2019
@@ -66,8 +66,8 @@ entry:
; CHECK: - Type: DATA
; CHECK-NEXT: Segments:
; CHECK-NEXT: - SectionOffset: 7
-; CHECK-NEXT: MemoryIndex: 0
-; CHECK-NEXT: Offset:
+; CHECK-NEXT: InitFlags: 0
+; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 1024
; CHECK-NEXT: Content: '02000000'
@@ -129,8 +129,8 @@ entry:
; NO-GC: - Type: DATA
; NO-GC-NEXT: Segments:
; NO-GC-NEXT: - SectionOffset: 7
-; NO-GC-NEXT: MemoryIndex: 0
-; NO-GC-NEXT: Offset:
+; NO-GC-NEXT: InitFlags: 0
+; NO-GC-NEXT: Offset:
; NO-GC-NEXT: Opcode: I32_CONST
; NO-GC-NEXT: Value: 1024
; NO-GC-NEXT: Content: '010000000000000002000000'
Modified: lld/trunk/test/wasm/init-fini.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/init-fini.ll?rev=354397&r1=354396&r2=354397&view=diff
==============================================================================
--- lld/trunk/test/wasm/init-fini.ll (original)
+++ lld/trunk/test/wasm/init-fini.ll Tue Feb 19 14:56:19 2019
@@ -1,5 +1,5 @@
-; RUN: llc -filetype=obj -o %t.o %s
-; RUN: llc -filetype=obj %S/Inputs/global-ctor-dtor.ll -o %t.global-ctor-dtor.o
+; RUN: llc -filetype=obj -thread-model=single -o %t.o %s
+; RUN: llc -filetype=obj -thread-model=single %S/Inputs/global-ctor-dtor.ll -o %t.global-ctor-dtor.o
target triple = "wasm32-unknown-unknown"
Modified: lld/trunk/test/wasm/local-symbols.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/local-symbols.ll?rev=354397&r1=354396&r2=354397&view=diff
==============================================================================
--- lld/trunk/test/wasm/local-symbols.ll (original)
+++ lld/trunk/test/wasm/local-symbols.ll Tue Feb 19 14:56:19 2019
@@ -101,7 +101,7 @@ entry:
; CHECK-NEXT: - Type: DATA
; CHECK-NEXT: Segments:
; CHECK-NEXT: - SectionOffset: 7
-; CHECK-NEXT: MemoryIndex: 0
+; CHECK-NEXT: InitFlags: 0
; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 1024
Modified: lld/trunk/test/wasm/locals-duplicate.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/locals-duplicate.test?rev=354397&r1=354396&r2=354397&view=diff
==============================================================================
--- lld/trunk/test/wasm/locals-duplicate.test (original)
+++ lld/trunk/test/wasm/locals-duplicate.test Tue Feb 19 14:56:19 2019
@@ -187,7 +187,7 @@
; CHECK-NEXT: - Type: DATA
; CHECK-NEXT: Segments:
; CHECK-NEXT: - SectionOffset: 7
-; CHECK-NEXT: MemoryIndex: 0
+; CHECK-NEXT: InitFlags: 0
; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 1024
@@ -363,19 +363,19 @@
; RELOC-NEXT: - Type: DATA
; RELOC-NEXT: Segments:
; RELOC-NEXT: - SectionOffset: 6
-; RELOC-NEXT: MemoryIndex: 0
+; RELOC-NEXT: InitFlags: 0
; RELOC-NEXT: Offset:
; RELOC-NEXT: Opcode: I32_CONST
; RELOC-NEXT: Value: 0
; RELOC-NEXT: Content: '0000000000000000'
; RELOC-NEXT: - SectionOffset: 19
-; RELOC-NEXT: MemoryIndex: 0
+; RELOC-NEXT: InitFlags: 0
; RELOC-NEXT: Offset:
; RELOC-NEXT: Opcode: I32_CONST
; RELOC-NEXT: Value: 8
; RELOC-NEXT: Content: '0000000000000000'
; RELOC-NEXT: - SectionOffset: 32
-; RELOC-NEXT: MemoryIndex: 0
+; RELOC-NEXT: InitFlags: 0
; RELOC-NEXT: Offset:
; RELOC-NEXT: Opcode: I32_CONST
; RELOC-NEXT: Value: 16
Modified: lld/trunk/test/wasm/lto/used.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/lto/used.ll?rev=354397&r1=354396&r2=354397&view=diff
==============================================================================
--- lld/trunk/test/wasm/lto/used.ll (original)
+++ lld/trunk/test/wasm/lto/used.ll Tue Feb 19 14:56:19 2019
@@ -28,7 +28,7 @@ return:
; CHECK: - Type: DATA
; CHECK-NEXT: Segments:
; CHECK-NEXT: - SectionOffset: 7
-; CHECK-NEXT: MemoryIndex: 0
+; CHECK-NEXT: InitFlags: 0
; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 1024
Modified: lld/trunk/test/wasm/many-functions.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/many-functions.ll?rev=354397&r1=354396&r2=354397&view=diff
==============================================================================
--- lld/trunk/test/wasm/many-functions.ll (original)
+++ lld/trunk/test/wasm/many-functions.ll Tue Feb 19 14:56:19 2019
@@ -802,13 +802,13 @@ entry:
; CHECK-NEXT: - Type: DATA
; CHECK-NEXT: Segments:
; CHECK-NEXT: - SectionOffset: 6
-; CHECK-NEXT: MemoryIndex: 0
+; CHECK-NEXT: InitFlags: 0
; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 0
; CHECK-NEXT: Content: '01000000'
; CHECK-NEXT: - SectionOffset: 15
-; CHECK-NEXT: MemoryIndex: 0
+; CHECK-NEXT: InitFlags: 0
; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 4
Modified: lld/trunk/test/wasm/relocatable.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/relocatable.ll?rev=354397&r1=354396&r2=354397&view=diff
==============================================================================
--- lld/trunk/test/wasm/relocatable.ll (original)
+++ lld/trunk/test/wasm/relocatable.ll Tue Feb 19 14:56:19 2019
@@ -120,37 +120,37 @@ entry:
; CHECK-NEXT: Offset: 0x0000002D
; CHECK-NEXT: Segments:
; CHECK-NEXT: - SectionOffset: 6
-; CHECK-NEXT: MemoryIndex: 0
+; CHECK-NEXT: InitFlags: 0
; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 0
; CHECK-NEXT: Content: 68656C6C6F0A00
; CHECK-NEXT: - SectionOffset: 18
-; CHECK-NEXT: MemoryIndex: 0
+; CHECK-NEXT: InitFlags: 0
; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 8
; CHECK-NEXT: Content: '01000000'
; CHECK-NEXT: - SectionOffset: 27
-; CHECK-NEXT: MemoryIndex: 0
+; CHECK-NEXT: InitFlags: 0
; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 12
; CHECK-NEXT: Content: '02000000'
; CHECK-NEXT: - SectionOffset: 36
-; CHECK-NEXT: MemoryIndex: 0
+; CHECK-NEXT: InitFlags: 0
; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 16
; CHECK-NEXT: Content: '03000000'
; CHECK-NEXT: - SectionOffset: 45
-; CHECK-NEXT: MemoryIndex: 0
+; CHECK-NEXT: InitFlags: 0
; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 24
; CHECK-NEXT: Content: '00000000'
; CHECK-NEXT: - SectionOffset: 54
-; CHECK-NEXT: MemoryIndex: 0
+; CHECK-NEXT: InitFlags: 0
; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 28
Modified: lld/trunk/test/wasm/shared.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/shared.ll?rev=354397&r1=354396&r2=354397&view=diff
==============================================================================
--- lld/trunk/test/wasm/shared.ll (original)
+++ lld/trunk/test/wasm/shared.ll Tue Feb 19 14:56:19 2019
@@ -75,7 +75,7 @@ declare void @func_external()
; CHECK: - Type: DATA
; CHECK-NEXT: Segments:
; CHECK-NEXT: - SectionOffset: 6
-; CHECK-NEXT: MemoryIndex: 0
+; CHECK-NEXT: InitFlags: 0
; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: GLOBAL_GET
; CHECK-NEXT: Index: 1
Modified: lld/trunk/test/wasm/weak-symbols.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/weak-symbols.ll?rev=354397&r1=354396&r2=354397&view=diff
==============================================================================
--- lld/trunk/test/wasm/weak-symbols.ll (original)
+++ lld/trunk/test/wasm/weak-symbols.ll Tue Feb 19 14:56:19 2019
@@ -118,7 +118,7 @@ entry:
; CHECK-NEXT: - Type: DATA
; CHECK-NEXT: Segments:
; CHECK-NEXT: - SectionOffset: 7
-; CHECK-NEXT: MemoryIndex: 0
+; CHECK-NEXT: InitFlags: 0
; CHECK-NEXT: Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 1024
More information about the llvm-commits
mailing list