1 # RUN: llvm-mc -triple=wasm32-unknown-unknown -mattr=+simd128,+nontrapping-fptoint,+exception-handling < %s | FileCheck %s
2 # Check that it converts to .o without errors:
3 # RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj -mattr=+simd128,+nontrapping-fptoint,+exception-handling < %s | obj2yaml | FileCheck -check-prefixes=BIN,BIN32 %s
5 # Same again for wasm64
7 # RUN: llvm-mc -triple=wasm64-unknown-unknown -mattr=+simd128,+nontrapping-fptoint,+exception-handling < %s | FileCheck %s
8 # Check that it converts to .o without errors:
9 # RUN: llvm-mc -triple=wasm64-unknown-unknown -filetype=obj -mattr=+simd128,+nontrapping-fptoint,+exception-handling < %s | obj2yaml | FileCheck -check-prefixes=BIN,BIN64 %s
11 # Minimal test for data sections.
14 .functype test0 () -> (i32)
19 .section .rodata..L.str,"",@
27 # CHECK-NEXT: .functype test0 () -> (i32)
28 # CHECK-NEXT: i32.const .L.str
29 # CHECK-NEXT: .Ltestlabel:
30 # CHECK-NEXT: end_function
32 # CHECK: .section .rodata..L.str,"",@
34 # CHECK-NEXT: .int8 100
38 # BIN-NEXT: FileHeader:
39 # BIN-NEXT: Version: 0x1
41 # BIN-NEXT: - Type: TYPE
42 # BIN-NEXT: Signatures:
43 # BIN-NEXT: - Index: 0
44 # BIN-NEXT: ParamTypes: []
45 # BIN-NEXT: ReturnTypes:
47 # BIN-NEXT: - Type: IMPORT
49 # BIN-NEXT: - Module: env
50 # BIN-NEXT: Field: __linear_memory
51 # BIN-NEXT: Kind: MEMORY
53 # BIN64-NEXT: Flags: [ IS_64 ]
54 # BIN-NEXT: Minimum: 0x1
55 # BIN-NEXT: - Type: FUNCTION
56 # BIN-NEXT: FunctionTypes: [ 0 ]
57 # BIN-NEXT: - Type: DATACOUNT
59 # BIN-NEXT: - Type: CODE
60 # BIN-NEXT: Relocations:
61 # BIN-NEXT: - Type: R_WASM_MEMORY_ADDR_SLEB
63 # BIN-NEXT: Offset: 0x4
64 # BIN-NEXT: Functions:
65 # BIN-NEXT: - Index: 0
66 # BIN-NEXT: Locals: []
67 # BIN-NEXT: Body: 4180808080000B
68 # BIN-NEXT: - Type: DATA
70 # BIN-NEXT: - SectionOffset: 6
71 # BIN-NEXT: InitFlags: 0
73 # BIN32-NEXT: Opcode: I32_CONST
74 # BIN64-NEXT: Opcode: I64_CONST
76 # BIN-NEXT: Content: '64'
77 # BIN-NEXT: - Type: CUSTOM
78 # BIN-NEXT: Name: linking
79 # BIN-NEXT: Version: 2
80 # BIN-NEXT: SymbolTable:
81 # BIN-NEXT: - Index: 0
82 # BIN-NEXT: Kind: FUNCTION
83 # BIN-NEXT: Name: test0
84 # BIN-NEXT: Flags: [ BINDING_LOCAL ]
85 # BIN-NEXT: Function: 0
86 # BIN-NEXT: - Index: 1
87 # BIN-NEXT: Kind: DATA
88 # BIN-NEXT: Name: .L.str
89 # BIN-NEXT: Flags: [ BINDING_LOCAL ]
90 # BIN-NEXT: Segment: 0
92 # BIN-NEXT: SegmentInfo:
93 # BIN-NEXT: - Index: 0
94 # BIN-NEXT: Name: .rodata..L.str
95 # BIN-NEXT: Alignment: 0
96 # BIN-NEXT: Flags: [ ]