Skip to content

Commit d28fabe

Browse files
committed
Test naked asm for wasm32-unknown-unknown
1 parent 68ac5ab commit d28fabe

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/assembly/naked-functions/wasm32.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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
1+
//@ revisions: wasm32-unknown wasm64-unknown wasm32-wasip1
42
//@ add-core-stubs
53
//@ assembly-output: emit-asm
4+
//@ [wasm32-unknown] compile-flags: --target wasm32-unknown-unknown
65
//@ [wasm64-unknown] compile-flags: --target wasm64-unknown-unknown
76
//@ [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

@@ -97,6 +97,7 @@ extern "C" fn fn_i64_i64(num: i64) -> i64 {
9797
}
9898

9999
// CHECK-LABEL: fn_i128_i128:
100+
// wasm32-unknown: .functype fn_i128_i128 (i32, i64, i64) -> ()
100101
// wasm32-wasip1: .functype fn_i128_i128 (i32, i64, i64) -> ()
101102
// wasm64-unknown: .functype fn_i128_i128 (i64, i64, i64) -> ()
102103
#[allow(improper_ctypes_definitions)]
@@ -114,6 +115,7 @@ extern "C" fn fn_i128_i128(num: i128) -> i128 {
114115
}
115116

116117
// CHECK-LABEL: fn_f128_f128:
118+
// wasm32-unknown: .functype fn_f128_f128 (i32, i64, i64) -> ()
117119
// wasm32-wasip1: .functype fn_f128_f128 (i32, i64, i64) -> ()
118120
// wasm64-unknown: .functype fn_f128_f128 (i64, i64, i64) -> ()
119121
#[no_mangle]
@@ -136,6 +138,7 @@ struct Compound {
136138
}
137139

138140
// CHECK-LABEL: fn_compound_compound:
141+
// wasm32-unknown: .functype fn_compound_compound (i32, i32) -> ()
139142
// wasm32-wasip1: .functype fn_compound_compound (i32, i32) -> ()
140143
// wasm64-unknown: .functype fn_compound_compound (i64, i64) -> ()
141144
#[no_mangle]

0 commit comments

Comments
 (0)