1
- //@ revisions: wasm32-unknown wasm64-unknown wasm32-wasip1
1
+ // FIXME: add wasm32-unknown when the wasm32-unknown-unknown ABI is fixed
2
+ // see https://github.com/rust-lang/rust/issues/115666
3
+ //@ revisions: wasm64-unknown wasm32-wasip1
2
4
//@ add-core-stubs
3
5
//@ assembly-output: emit-asm
4
- //@ [wasm32-unknown] compile-flags: --target wasm32-unknown-unknown
5
6
//@ [wasm64-unknown] compile-flags: --target wasm64-unknown-unknown
6
7
//@ [wasm32-wasip1] compile-flags: --target wasm32-wasip1
7
- //@ [wasm32-unknown] needs-llvm-components: webassembly
8
8
//@ [wasm64-unknown] needs-llvm-components: webassembly
9
9
//@ [wasm32-wasip1] needs-llvm-components: webassembly
10
10
@@ -98,7 +98,7 @@ unsafe extern "C" fn fn_i64_i64(num: i64) -> i64 {
98
98
}
99
99
100
100
// CHECK-LABEL: fn_i128_i128:
101
- // wasm32-unknown,wasm32- wasip1: .functype fn_i128_i128 (i32, i64, i64) -> ()
101
+ // wasm32-wasip1: .functype fn_i128_i128 (i32, i64, i64) -> ()
102
102
// wasm64-unknown: .functype fn_i128_i128 (i64, i64, i64) -> ()
103
103
#[ allow( improper_ctypes_definitions) ]
104
104
#[ no_mangle]
@@ -115,7 +115,7 @@ unsafe extern "C" fn fn_i128_i128(num: i128) -> i128 {
115
115
}
116
116
117
117
// CHECK-LABEL: fn_f128_f128:
118
- // wasm32-unknown,wasm32- wasip1: .functype fn_f128_f128 (i32, i64, i64) -> ()
118
+ // wasm32-wasip1: .functype fn_f128_f128 (i32, i64, i64) -> ()
119
119
// wasm64-unknown: .functype fn_f128_f128 (i64, i64, i64) -> ()
120
120
#[ no_mangle]
121
121
#[ naked]
@@ -138,18 +138,19 @@ struct Compound {
138
138
139
139
// CHECK-LABEL: fn_compound_compound:
140
140
// wasm32-wasip1: .functype fn_compound_compound (i32, i32) -> ()
141
- // wasm32-unknown: .functype fn_compound_compound (i32, i32, i64) -> ()
142
141
// wasm64-unknown: .functype fn_compound_compound (i64, i64) -> ()
143
142
#[ no_mangle]
144
143
#[ naked]
145
144
unsafe extern "C" fn fn_compound_compound ( _: Compound ) -> Compound {
146
- // this is the wasm32-unknown-unknown assembly
145
+ // this is the wasm32-wasip1 assembly
147
146
naked_asm ! (
148
147
"local.get 0" ,
149
- "local.get 2" ,
148
+ "local.get 1" ,
149
+ "i64.load 8" ,
150
150
"i64.store 8" ,
151
151
"local.get 0" ,
152
152
"local.get 1" ,
153
+ "i32.load16_u 0" ,
153
154
"i32.store16 0" ,
154
155
)
155
156
}
0 commit comments