• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
2
3target triple = "wasm32-unknown-unknown"
4
5@.str1 = private unnamed_addr constant [6 x i8] c"hello\00", align 1
6@.str2 = private unnamed_addr constant [6 x i8] c"world\00", align 1
7
8@a = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0), align 8
9@b = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str2, i32 0, i32 0), align 8
10
11
12; CHECK:        - Type:            DATA
13; CHECK-NEXT:     Relocations:
14; CHECK-NEXT:       - Type:            R_WEBASSEMBLY_MEMORY_ADDR_I32
15; CHECK-NEXT:         Index:           0
16; CHECK-NEXT:         Offset:          0x0000001C
17; CHECK-NEXT:       - Type:            R_WEBASSEMBLY_MEMORY_ADDR_I32
18; CHECK-NEXT:         Index:           1
19; CHECK-NEXT:         Offset:          0x00000025
20; CHECK-NEXT:     Segments:
21; CHECK-NEXT:       - SectionOffset:   6
22; CHECK-NEXT:         MemoryIndex:     0
23; CHECK-NEXT:         Offset:
24; CHECK-NEXT:           Opcode:          I32_CONST
25; CHECK-NEXT:           Value:           0
26; CHECK-NEXT:         Content:         68656C6C6F00
27; CHECK-NEXT:       - SectionOffset:   17
28; CHECK-NEXT:         MemoryIndex:     0
29; CHECK-NEXT:         Offset:
30; CHECK-NEXT:           Opcode:          I32_CONST
31; CHECK-NEXT:           Value:           6
32; CHECK-NEXT:         Content:         776F726C6400
33; CHECK-NEXT:       - SectionOffset:   28
34; CHECK-NEXT:         MemoryIndex:     0
35; CHECK-NEXT:         Offset:
36; CHECK-NEXT:           Opcode:          I32_CONST
37; CHECK-NEXT:           Value:           16
38; CHECK-NEXT:         Content:         '00000000'
39; CHECK-NEXT:       - SectionOffset:   37
40; CHECK-NEXT:         MemoryIndex:     0
41; CHECK-NEXT:         Offset:
42; CHECK-NEXT:           Opcode:          I32_CONST
43; CHECK-NEXT:           Value:           24
44; CHECK-NEXT:         Content:         '06000000'
45; CHECK-NEXT:   - Type:            CUSTOM
46; CHECK-NEXT:     Name:            linking
47; CHECK-NEXT:     Version:         1
48; CHECK-NEXT:     SymbolTable:
49; CHECK-NEXT:       - Index:           0
50; CHECK-NEXT:         Kind:            DATA
51; CHECK-NEXT:         Name:            .L.str1
52; CHECK-NEXT:         Flags:           [ BINDING_LOCAL ]
53; CHECK-NEXT:         Segment:         0
54; CHECK-NEXT:         Size:            6
55; CHECK-NEXT:       - Index:           1
56; CHECK-NEXT:         Kind:            DATA
57; CHECK-NEXT:         Name:            .L.str2
58; CHECK-NEXT:         Flags:           [ BINDING_LOCAL ]
59; CHECK-NEXT:         Segment:         1
60; CHECK-NEXT:         Size:            6
61; CHECK-NEXT:       - Index:           2
62; CHECK-NEXT:         Kind:            DATA
63; CHECK-NEXT:         Name:            a
64; CHECK-NEXT:         Flags:           [  ]
65; CHECK-NEXT:         Segment:         2
66; CHECK-NEXT:         Size:            4
67; CHECK-NEXT:       - Index:           3
68; CHECK-NEXT:         Kind:            DATA
69; CHECK-NEXT:         Name:            b
70; CHECK-NEXT:         Flags:           [  ]
71; CHECK-NEXT:         Segment:         3
72; CHECK-NEXT:         Size:            4
73; CHECK-NEXT:     SegmentInfo:
74; CHECK-NEXT:       - Index:       0
75; CHECK-NEXT:         Name:        .rodata..L.str1
76; CHECK-NEXT:         Alignment:   1
77; CHECK-NEXT:         Flags:       [ ]
78; CHECK-NEXT:       - Index:       1
79; CHECK-NEXT:         Name:        .rodata..L.str2
80; CHECK-NEXT:         Alignment:   1
81; CHECK-NEXT:         Flags:       [ ]
82; CHECK-NEXT:       - Index:       2
83; CHECK-NEXT:         Name:        .data.a
84; CHECK-NEXT:         Alignment:   8
85; CHECK-NEXT:         Flags:       [ ]
86; CHECK-NEXT:       - Index:       3
87; CHECK-NEXT:         Name:        .data.b
88; CHECK-NEXT:         Alignment:   8
89; CHECK-NEXT:         Flags:       [ ]
90; CHECK_NEXT:   ...
91