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
24//@ add-core-stubs
35//@ assembly-output: emit-asm
4- //@ [wasm32-unknown] compile-flags: --target wasm32-unknown-unknown
56//@ [wasm64-unknown] compile-flags: --target wasm64-unknown-unknown
67//@ [wasm32-wasip1] compile-flags: --target wasm32-wasip1
7- //@ [wasm32-unknown] needs-llvm-components: webassembly
88//@ [wasm64-unknown] needs-llvm-components: webassembly
99//@ [wasm32-wasip1] needs-llvm-components: webassembly
1010
@@ -98,7 +98,7 @@ unsafe extern "C" fn fn_i64_i64(num: i64) -> i64 {
9898}
9999
100100// 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) -> ()
102102// wasm64-unknown: .functype fn_i128_i128 (i64, i64, i64) -> ()
103103#[ allow( improper_ctypes_definitions) ]
104104#[ no_mangle]
@@ -115,7 +115,7 @@ unsafe extern "C" fn fn_i128_i128(num: i128) -> i128 {
115115}
116116
117117// 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) -> ()
119119// wasm64-unknown: .functype fn_f128_f128 (i64, i64, i64) -> ()
120120#[ no_mangle]
121121#[ naked]
@@ -138,18 +138,19 @@ struct Compound {
138138
139139// CHECK-LABEL: fn_compound_compound:
140140// wasm32-wasip1: .functype fn_compound_compound (i32, i32) -> ()
141- // wasm32-unknown: .functype fn_compound_compound (i32, i32, i64) -> ()
142141// wasm64-unknown: .functype fn_compound_compound (i64, i64) -> ()
143142#[ no_mangle]
144143#[ naked]
145144unsafe extern "C" fn fn_compound_compound ( _: Compound ) -> Compound {
146- // this is the wasm32-unknown-unknown assembly
145+ // this is the wasm32-wasip1 assembly
147146 naked_asm ! (
148147 "local.get 0" ,
149- "local.get 2" ,
148+ "local.get 1" ,
149+ "i64.load 8" ,
150150 "i64.store 8" ,
151151 "local.get 0" ,
152152 "local.get 1" ,
153+ "i32.load16_u 0" ,
153154 "i32.store16 0" ,
154155 )
155156}
0 commit comments