2017-09-16 04:54:59 +08:00
|
|
|
; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s
|
|
|
|
|
|
|
|
%struct.bd = type { i32, i8 }
|
|
|
|
|
|
|
|
@global0 = global i32 8, align 8
|
|
|
|
@global1 = global %struct.bd { i32 1, i8 3 }, align 8, section ".sec1"
|
|
|
|
@global2 = global i64 7, align 8, section ".sec1"
|
|
|
|
@global3 = global i32 8, align 8, section ".sec2"
|
|
|
|
|
|
|
|
; CHECK: - Type: GLOBAL
|
|
|
|
; CHECK-NEXT: Globals:
|
|
|
|
; CHECK-NEXT: - Type: I32
|
|
|
|
; CHECK-NEXT: Mutable: false
|
|
|
|
; CHECK-NEXT: InitExpr:
|
|
|
|
; CHECK-NEXT: Opcode: I32_CONST
|
|
|
|
; CHECK-NEXT: Value: 0
|
|
|
|
; CHECK-NEXT: - Type: I32
|
|
|
|
; CHECK-NEXT: Mutable: false
|
|
|
|
; CHECK-NEXT: InitExpr:
|
|
|
|
; CHECK-NEXT: Opcode: I32_CONST
|
|
|
|
; CHECK-NEXT: Value: 8
|
|
|
|
; CHECK-NEXT: - Type: I32
|
|
|
|
; CHECK-NEXT: Mutable: false
|
|
|
|
; CHECK-NEXT: InitExpr:
|
|
|
|
; CHECK-NEXT: Opcode: I32_CONST
|
|
|
|
; CHECK-NEXT: Value: 16
|
|
|
|
; CHECK-NEXT: - Type: I32
|
|
|
|
; CHECK-NEXT: Mutable: false
|
|
|
|
; CHECK-NEXT: InitExpr:
|
|
|
|
; CHECK-NEXT: Opcode: I32_CONST
|
|
|
|
; CHECK-NEXT: Value: 24
|
|
|
|
; CHECK-NEXT: - Type: EXPORT
|
|
|
|
; CHECK-NEXT: Exports:
|
|
|
|
; CHECK-NEXT: - Name: global0
|
|
|
|
; CHECK-NEXT: Kind: GLOBAL
|
|
|
|
; CHECK-NEXT: Index: 0
|
|
|
|
; CHECK-NEXT: - Name: global1
|
|
|
|
; CHECK-NEXT: Kind: GLOBAL
|
|
|
|
; CHECK-NEXT: Index: 1
|
|
|
|
; CHECK-NEXT: - Name: global2
|
|
|
|
; CHECK-NEXT: Kind: GLOBAL
|
|
|
|
; CHECK-NEXT: Index: 2
|
|
|
|
; CHECK-NEXT: - Name: global3
|
|
|
|
; CHECK-NEXT: Kind: GLOBAL
|
|
|
|
; CHECK-NEXT: Index: 3
|
|
|
|
; CHECK-NEXT: - Type: DATA
|
|
|
|
; CHECK-NEXT: Segments:
|
|
|
|
; CHECK-NEXT: - SectionOffset: 6
|
|
|
|
; CHECK-NEXT: MemoryIndex: 0
|
|
|
|
; CHECK-NEXT: Offset:
|
|
|
|
; CHECK-NEXT: Opcode: I32_CONST
|
|
|
|
; CHECK-NEXT: Value: 0
|
|
|
|
; CHECK-NEXT: Content: '08000000'
|
|
|
|
; CHECK-NEXT: - SectionOffset: 15
|
|
|
|
; CHECK-NEXT: MemoryIndex: 0
|
|
|
|
; CHECK-NEXT: Offset:
|
|
|
|
; CHECK-NEXT: Opcode: I32_CONST
|
|
|
|
; CHECK-NEXT: Value: 8
|
|
|
|
; CHECK-NEXT: Content: '01000000030000000700000000000000'
|
|
|
|
; CHECK-NEXT: - SectionOffset: 36
|
|
|
|
; CHECK-NEXT: MemoryIndex: 0
|
|
|
|
; CHECK-NEXT: Offset:
|
|
|
|
; CHECK-NEXT: Opcode: I32_CONST
|
|
|
|
; CHECK-NEXT: Value: 24
|
|
|
|
; CHECK-NEXT: Content: '08000000'
|
2017-09-21 03:03:35 +08:00
|
|
|
|
|
|
|
; CHECK: - Type: CUSTOM
|
|
|
|
; CHECK-NEXT: Name: linking
|
|
|
|
; CHECK-NEXT: DataSize: 28
|
2017-09-30 00:50:08 +08:00
|
|
|
; CHECK-NEXT: SegmentInfo:
|
2017-09-21 03:03:35 +08:00
|
|
|
; CHECK-NEXT: - Index: 0
|
|
|
|
; CHECK-NEXT: Name: .data.global0
|
2017-09-30 00:50:08 +08:00
|
|
|
; CHECK-NEXT: Alignment: 8
|
2017-12-14 06:02:25 +08:00
|
|
|
; CHECK-NEXT: Flags: [ ]
|
2017-09-21 03:03:35 +08:00
|
|
|
; CHECK-NEXT: - Index: 1
|
|
|
|
; CHECK-NEXT: Name: .sec1
|
2017-09-30 00:50:08 +08:00
|
|
|
; CHECK-NEXT: Alignment: 8
|
2017-12-14 06:02:25 +08:00
|
|
|
; CHECK-NEXT: Flags: [ ]
|
2017-09-21 03:03:35 +08:00
|
|
|
; CHECK-NEXT: - Index: 2
|
|
|
|
; CHECK-NEXT: Name: .sec2
|
2017-09-30 00:50:08 +08:00
|
|
|
; CHECK-NEXT: Alignment: 8
|
2017-12-14 06:02:25 +08:00
|
|
|
; CHECK-NEXT: Flags: [ ]
|
2017-09-21 03:03:35 +08:00
|
|
|
; CHECK-NEXT: ...
|