2018-01-24 07:03:47 +08:00
|
|
|
; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
|
|
|
|
|
2018-05-11 01:49:11 +08:00
|
|
|
target triple = "wasm32-unknown-unknown"
|
2017-05-26 05:08:07 +08:00
|
|
|
|
|
|
|
@.str1 = private unnamed_addr constant [6 x i8] c"hello\00", align 1
|
|
|
|
@.str2 = private unnamed_addr constant [6 x i8] c"world\00", align 1
|
|
|
|
|
|
|
|
@a = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0), align 8
|
|
|
|
@b = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str2, i32 0, i32 0), align 8
|
|
|
|
|
|
|
|
|
2018-02-23 13:08:34 +08:00
|
|
|
; CHECK: - Type: DATA
|
2017-06-28 04:27:59 +08:00
|
|
|
; CHECK-NEXT: Relocations:
|
2019-02-05 01:28:46 +08:00
|
|
|
; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_I32
|
2017-06-28 04:27:59 +08:00
|
|
|
; CHECK-NEXT: Index: 0
|
2017-09-15 07:07:53 +08:00
|
|
|
; CHECK-NEXT: Offset: 0x0000001C
|
2019-02-05 01:28:46 +08:00
|
|
|
; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_I32
|
2017-06-28 04:27:59 +08:00
|
|
|
; CHECK-NEXT: Index: 1
|
2017-09-15 07:07:53 +08:00
|
|
|
; CHECK-NEXT: Offset: 0x00000025
|
2017-06-28 04:27:59 +08:00
|
|
|
; CHECK-NEXT: Segments:
|
2017-07-12 08:24:54 +08:00
|
|
|
; CHECK-NEXT: - SectionOffset: 6
|
|
|
|
; CHECK-NEXT: MemoryIndex: 0
|
2017-06-28 04:27:59 +08:00
|
|
|
; CHECK-NEXT: Offset:
|
|
|
|
; CHECK-NEXT: Opcode: I32_CONST
|
|
|
|
; CHECK-NEXT: Value: 0
|
2017-09-15 07:07:53 +08:00
|
|
|
; CHECK-NEXT: Content: 68656C6C6F00
|
|
|
|
; CHECK-NEXT: - SectionOffset: 17
|
|
|
|
; CHECK-NEXT: MemoryIndex: 0
|
|
|
|
; CHECK-NEXT: Offset:
|
|
|
|
; CHECK-NEXT: Opcode: I32_CONST
|
|
|
|
; CHECK-NEXT: Value: 6
|
|
|
|
; CHECK-NEXT: Content: 776F726C6400
|
|
|
|
; CHECK-NEXT: - SectionOffset: 28
|
|
|
|
; CHECK-NEXT: MemoryIndex: 0
|
|
|
|
; CHECK-NEXT: Offset:
|
|
|
|
; CHECK-NEXT: Opcode: I32_CONST
|
|
|
|
; CHECK-NEXT: Value: 16
|
|
|
|
; CHECK-NEXT: Content: '00000000'
|
|
|
|
; CHECK-NEXT: - SectionOffset: 37
|
|
|
|
; CHECK-NEXT: MemoryIndex: 0
|
|
|
|
; CHECK-NEXT: Offset:
|
|
|
|
; CHECK-NEXT: Opcode: I32_CONST
|
|
|
|
; CHECK-NEXT: Value: 24
|
|
|
|
; CHECK-NEXT: Content: '06000000'
|
2017-06-28 04:27:59 +08:00
|
|
|
; CHECK-NEXT: - Type: CUSTOM
|
|
|
|
; CHECK-NEXT: Name: linking
|
2019-01-16 09:34:48 +08:00
|
|
|
; CHECK-NEXT: Version: 2
|
2018-02-23 13:08:34 +08:00
|
|
|
; CHECK-NEXT: SymbolTable:
|
|
|
|
; CHECK-NEXT: - Index: 0
|
|
|
|
; CHECK-NEXT: Kind: DATA
|
|
|
|
; CHECK-NEXT: Name: .L.str1
|
2017-12-14 06:02:25 +08:00
|
|
|
; CHECK-NEXT: Flags: [ BINDING_LOCAL ]
|
2018-02-23 13:08:34 +08:00
|
|
|
; CHECK-NEXT: Segment: 0
|
|
|
|
; CHECK-NEXT: Size: 6
|
|
|
|
; CHECK-NEXT: - Index: 1
|
|
|
|
; CHECK-NEXT: Kind: DATA
|
|
|
|
; CHECK-NEXT: Name: .L.str2
|
2017-12-14 06:02:25 +08:00
|
|
|
; CHECK-NEXT: Flags: [ BINDING_LOCAL ]
|
2018-02-23 13:08:34 +08:00
|
|
|
; CHECK-NEXT: Segment: 1
|
|
|
|
; CHECK-NEXT: Size: 6
|
|
|
|
; CHECK-NEXT: - Index: 2
|
|
|
|
; CHECK-NEXT: Kind: DATA
|
|
|
|
; CHECK-NEXT: Name: a
|
|
|
|
; CHECK-NEXT: Flags: [ ]
|
|
|
|
; CHECK-NEXT: Segment: 2
|
|
|
|
; CHECK-NEXT: Size: 4
|
|
|
|
; CHECK-NEXT: - Index: 3
|
|
|
|
; CHECK-NEXT: Kind: DATA
|
|
|
|
; CHECK-NEXT: Name: b
|
|
|
|
; CHECK-NEXT: Flags: [ ]
|
|
|
|
; CHECK-NEXT: Segment: 3
|
|
|
|
; CHECK-NEXT: Size: 4
|
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: .rodata..L.str1
|
2019-01-16 09:34:48 +08:00
|
|
|
; CHECK-NEXT: Alignment: 0
|
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: .rodata..L.str2
|
2019-01-16 09:34:48 +08:00
|
|
|
; CHECK-NEXT: Alignment: 0
|
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: .data.a
|
2019-01-16 09:34:48 +08:00
|
|
|
; CHECK-NEXT: Alignment: 3
|
2017-12-14 06:02:25 +08:00
|
|
|
; CHECK-NEXT: Flags: [ ]
|
2017-09-21 03:03:35 +08:00
|
|
|
; CHECK-NEXT: - Index: 3
|
|
|
|
; CHECK-NEXT: Name: .data.b
|
2019-01-16 09:34:48 +08:00
|
|
|
; CHECK-NEXT: Alignment: 3
|
2017-12-14 06:02:25 +08:00
|
|
|
; CHECK-NEXT: Flags: [ ]
|
2017-09-21 05:17:04 +08:00
|
|
|
; CHECK_NEXT: ...
|