mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
372cf2c00b
Summary: This ensures that object files will continue to validate as WebAssembly modules in the presence of bulk memory operations. Engines that don't support bulk memory operations will not recognize the DataCount section and will report validation errors, but that's ok because object files aren't supposed to be run directly anyway. Reviewers: aheejin, dschuff, sbc100 Subscribers: jgravelle-google, hiraditya, sunfish, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60623 llvm-svn: 358315
82 lines
3.1 KiB
LLVM
82 lines
3.1 KiB
LLVM
; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
|
|
|
|
target triple = "wasm32-unknown-unknown"
|
|
|
|
@g0 = global i8* null, align 4
|
|
@g1 = global i32 0, align 4
|
|
|
|
%union.u1 = type {}
|
|
@foo = global %union.u1 zeroinitializer, align 1
|
|
@bar = global %union.u1 zeroinitializer, align 1
|
|
|
|
; CHECK: - Type: DATA{{$}}
|
|
; CHECK-NEXT: Segments:
|
|
; CHECK-NEXT: - SectionOffset: 6
|
|
; CHECK-NEXT: InitFlags: 0
|
|
; CHECK-NEXT: Offset:
|
|
; CHECK-NEXT: Opcode: I32_CONST
|
|
; CHECK-NEXT: Value: 0
|
|
; CHECK-NEXT: Content: '00000000'
|
|
; CHECK-NEXT: - SectionOffset: 15
|
|
; CHECK-NEXT: InitFlags: 0
|
|
; CHECK-NEXT: Offset:
|
|
; CHECK-NEXT: Opcode: I32_CONST
|
|
; CHECK-NEXT: Value: 4
|
|
; CHECK-NEXT: Content: '00000000'
|
|
; CHECK-NEXT: - SectionOffset: 24
|
|
; CHECK-NEXT: InitFlags: 0
|
|
; CHECK-NEXT: Offset:
|
|
; CHECK-NEXT: Opcode: I32_CONST
|
|
; CHECK-NEXT: Value: 8
|
|
; CHECK-NEXT: Content: ''
|
|
; CHECK-NEXT: - SectionOffset: 29
|
|
; CHECK-NEXT: InitFlags: 0
|
|
; CHECK-NEXT: Offset:
|
|
; CHECK-NEXT: Opcode: I32_CONST
|
|
; CHECK-NEXT: Value: 8
|
|
; CHECK-NEXT: Content: ''
|
|
|
|
; CHECK: SymbolTable:
|
|
; CHECK-NEXT: - Index: 0
|
|
; CHECK-NEXT: Kind: DATA
|
|
; CHECK-NEXT: Name: g0
|
|
; CHECK-NEXT: Flags: [ ]
|
|
; CHECK-NEXT: Segment: 0
|
|
; CHECK-NEXT: Size: 4
|
|
; CHECK-NEXT: - Index: 1
|
|
; CHECK-NEXT: Kind: DATA
|
|
; CHECK-NEXT: Name: g1
|
|
; CHECK-NEXT: Flags: [ ]
|
|
; CHECK-NEXT: Segment: 1
|
|
; CHECK-NEXT: Size: 4
|
|
; CHECK-NEXT: - Index: 2
|
|
; CHECK-NEXT: Kind: DATA
|
|
; CHECK-NEXT: Name: foo
|
|
; CHECK-NEXT: Flags: [ ]
|
|
; CHECK-NEXT: Segment: 2
|
|
; CHECK-NEXT: Size: 0
|
|
; CHECK-NEXT: - Index: 3
|
|
; CHECK-NEXT: Kind: DATA
|
|
; CHECK-NEXT: Name: bar
|
|
; CHECK-NEXT: Flags: [ ]
|
|
; CHECK-NEXT: Segment: 3
|
|
; CHECK-NEXT: Size: 0
|
|
; CHECK-NEXT: SegmentInfo:
|
|
; CHECK-NEXT: - Index: 0
|
|
; CHECK-NEXT: Name: .bss.g0
|
|
; CHECK-NEXT: Alignment: 2
|
|
; CHECK-NEXT: Flags: [ ]
|
|
; CHECK-NEXT: - Index: 1
|
|
; CHECK-NEXT: Name: .bss.g1
|
|
; CHECK-NEXT: Alignment: 2
|
|
; CHECK-NEXT: Flags: [ ]
|
|
; CHECK-NEXT: - Index: 2
|
|
; CHECK-NEXT: Name: .bss.foo
|
|
; CHECK-NEXT: Alignment: 0
|
|
; CHECK-NEXT: Flags: [ ]
|
|
; CHECK-NEXT: - Index: 3
|
|
; CHECK-NEXT: Name: .bss.bar
|
|
; CHECK-NEXT: Alignment: 0
|
|
; CHECK-NEXT: Flags: [ ]
|
|
; CHECK-NEXT: ...
|