[AArch64][SME2] Add multi-vector saturating doubling multiply high intrinsics
[llvm-project.git] / lld / test / wasm / signature-mismatch.s
blob5d305efca2464966011e3e5fcd44118bc164cf8e
1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ret32.s -o %t.ret32.o
2 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/call-ret32.s -o %t.call.o
3 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.main.o
5 # RUN: wasm-ld --export=call_ret32 --export=ret32 -o %t.wasm %t.main.o %t.ret32.o %t.call.o 2>&1 | FileCheck %s -check-prefix=WARN
6 # RUN: obj2yaml %t.wasm | FileCheck %s -check-prefix=YAML
8 # RUN: wasm-ld -r -o %t.reloc.o %t.main.o %t.ret32.o %t.call.o 2>&1 | FileCheck %s -check-prefix=WARN
9 # RUN: obj2yaml %t.reloc.o | FileCheck %s -check-prefix=RELOC
11 # RUN: not wasm-ld --fatal-warnings -o %t.wasm %t.main.o %t.ret32.o %t.call.o 2>&1 | FileCheck %s -check-prefix=ERROR
13 .functype ret32 (i32, i64, i32) -> (i32)
15 .hidden _start
16 .globl _start
17 _start:
18 .functype _start () -> ()
19 i32.const 1
20 i64.const 2
21 i32.const 3
22 call ret32
23 drop
24 i32.const 1
25 i64.const 2
26 i32.const 3
27 i32.const 0
28 i32.load ret32_address_main
29 call_indirect (i32, i64, i32) -> (i32)
30 drop
31 end_function
33 .section .data,"",@
34 .globl ret32_address_main
35 .p2align 2
37 ret32_address_main:
38 .int32 ret32
39 .size ret32_address_main, 4
41 # WARN: warning: function signature mismatch: ret32
42 # WARN-NEXT: >>> defined as (i32, i64, i32) -> i32 in {{.*}}.main.o
43 # WARN-NEXT: >>> defined as (f32) -> i32 in {{.*}}.ret32.o
45 # ERROR: error: function signature mismatch: ret32
46 # ERROR-NEXT: >>> defined as (i32, i64, i32) -> i32 in {{.*}}.main.o
47 # ERROR-NEXT: >>> defined as (f32) -> i32 in {{.*}}.ret32.o
49 # YAML: - Type: EXPORT
50 # YAML: - Name: ret32
51 # YAML-NEXT: Kind: FUNCTION
52 # YAML-NEXT: Index: 2
53 # YAML-NEXT: - Name: call_ret32
54 # YAML-NEXT: Kind: FUNCTION
55 # YAML-NEXT: Index: 3
57 # YAML: - Type: CUSTOM
58 # YAML-NEXT: Name: name
59 # YAML-NEXT: FunctionNames:
60 # YAML-NEXT: - Index: 0
61 # YAML-NEXT: Name: 'signature_mismatch:ret32'
62 # YAML-NEXT: - Index: 1
63 # YAML-NEXT: Name: _start
64 # YAML-NEXT: - Index: 2
65 # YAML-NEXT: Name: ret32
66 # YAML-NEXT: - Index: 3
67 # YAML-NEXT: Name: call_ret32
68 # YAML-NEXT: GlobalNames:
69 # YAML-NEXT: - Index: 0
70 # YAML-NEXT: Name: __stack_pointer
71 # YAML-NEXT: DataSegmentNames:
72 # YAML-NEXT: - Index: 0
73 # YAML-NEXT: Name: .data
74 # YAML-NEXT: ...
76 # RELOC: Name: linking
77 # RELOC-NEXT: Version: 2
78 # RELOC-NEXT: SymbolTable:
79 # RELOC-NEXT: - Index: 0
80 # RELOC-NEXT: Kind: FUNCTION
81 # RELOC-NEXT: Name: _start
82 # RELOC-NEXT: Flags: [ VISIBILITY_HIDDEN ]
83 # RELOC-NEXT: Function: 1
84 # RELOC-NEXT: - Index: 1
85 # RELOC-NEXT: Kind: FUNCTION
86 # RELOC-NEXT: Name: ret32
87 # RELOC-NEXT: Flags: [ VISIBILITY_HIDDEN ]
88 # RELOC-NEXT: Function: 2
89 # RELOC-NEXT: - Index: 2
90 # RELOC-NEXT: Kind: DATA
91 # RELOC-NEXT: Name: ret32_address_main
92 # RELOC-NEXT: Flags: [ ]
93 # RELOC-NEXT: Segment: 0
94 # RELOC-NEXT: Size: 4
95 # RELOC-NEXT: - Index: 3
96 # RELOC-NEXT: Kind: TABLE
97 # RELOC-NEXT: Name: __indirect_function_table
98 # RELOC-NEXT: Flags: [ UNDEFINED, NO_STRIP ]
99 # RELOC-NEXT: Table: 0
100 # RELOC-NEXT: - Index: 4
101 # RELOC-NEXT: Kind: FUNCTION
102 # RELOC-NEXT: Name: call_ret32
103 # RELOC-NEXT: Flags: [ ]
104 # RELOC-NEXT: Function: 3
105 # RELOC-NEXT: - Index: 5
106 # RELOC-NEXT: Kind: DATA
107 # RELOC-NEXT: Name: ret32_address
108 # RELOC-NEXT: Flags: [ ]
109 # RELOC-NEXT: Segment: 1
110 # RELOC-NEXT: Size: 4
111 # RELOC-NEXT: - Index: 6
112 # RELOC-NEXT: Kind: FUNCTION
113 # RELOC-NEXT: Name: 'signature_mismatch:ret32'
114 # RELOC-NEXT: Flags: [ BINDING_LOCAL ]
115 # RELOC-NEXT: Function: 0