diff options
| author | Jules Bertholet <julesbertholet@quoi.xyz> | 2025-07-06 18:10:52 -0400 |
|---|---|---|
| committer | Jules Bertholet <julesbertholet@quoi.xyz> | 2025-07-06 18:10:52 -0400 |
| commit | 8f86c4abec54ecc06b469fff2cccf0a4182db41d (patch) | |
| tree | 68ee7a7c831febe20703ae5569e336b388e28c17 | |
| parent | 196e3ed94357c29d2b29386023e19cc6cc83a175 (diff) | |
| download | rust-8f86c4abec54ecc06b469fff2cccf0a4182db41d.tar.gz rust-8f86c4abec54ecc06b469fff2cccf0a4182db41d.zip | |
Skip `align` tests on wasm
| -rw-r--r-- | tests/assembly/naked-functions/wasm32.rs | 10 | ||||
| -rw-r--r-- | tests/codegen/align-fn.rs | 1 | ||||
| -rw-r--r-- | tests/codegen/min-function-alignment.rs | 1 | ||||
| -rw-r--r-- | tests/codegen/naked-fn/aligned.rs | 1 | ||||
| -rw-r--r-- | tests/codegen/naked-fn/min-function-alignment.rs | 1 | ||||
| -rw-r--r-- | tests/ui/attributes/fn-align-dyn.rs | 1 |
6 files changed, 9 insertions, 6 deletions
diff --git a/tests/assembly/naked-functions/wasm32.rs b/tests/assembly/naked-functions/wasm32.rs index 5f114246ad5..77547e82041 100644 --- a/tests/assembly/naked-functions/wasm32.rs +++ b/tests/assembly/naked-functions/wasm32.rs @@ -27,18 +27,16 @@ extern "C" fn nop() { naked_asm!("nop") } -// CHECK: .section .text.weak_aligned_nop,"",@ -// CHECK: .weak weak_aligned_nop +// CHECK: .section .text.weak_nop,"",@ +// CHECK: .weak weak_nop // CHECK-LABEL: nop: -// CHECK: .functype weak_aligned_nop () -> () +// CHECK: .functype weak_nop () -> () // CHECK-NOT: .size // CHECK: end_function #[no_mangle] #[unsafe(naked)] #[linkage = "weak"] -// wasm functions cannot be aligned, so this has no effect -#[align(32)] -extern "C" fn weak_aligned_nop() { +extern "C" fn weak_nop() { naked_asm!("nop") } diff --git a/tests/codegen/align-fn.rs b/tests/codegen/align-fn.rs index c871d125950..fd572910c28 100644 --- a/tests/codegen/align-fn.rs +++ b/tests/codegen/align-fn.rs @@ -1,5 +1,6 @@ //@ compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0 -Clink-dead-code //@ edition: 2024 +//@ ignore-wasm32 aligning functions is not currently supported on wasm (#143368) #![crate_type = "lib"] #![feature(fn_align)] diff --git a/tests/codegen/min-function-alignment.rs b/tests/codegen/min-function-alignment.rs index 78989ec5df2..6a3843b0f4f 100644 --- a/tests/codegen/min-function-alignment.rs +++ b/tests/codegen/min-function-alignment.rs @@ -2,6 +2,7 @@ //@ compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0 -Clink-dead-code //@ [align16] compile-flags: -Zmin-function-alignment=16 //@ [align1024] compile-flags: -Zmin-function-alignment=1024 +//@ ignore-wasm32 aligning functions is not currently supported on wasm (#143368) #![crate_type = "lib"] #![feature(fn_align)] diff --git a/tests/codegen/naked-fn/aligned.rs b/tests/codegen/naked-fn/aligned.rs index f9fce8e5a5d..2648b0213ca 100644 --- a/tests/codegen/naked-fn/aligned.rs +++ b/tests/codegen/naked-fn/aligned.rs @@ -1,6 +1,7 @@ //@ compile-flags: -C no-prepopulate-passes -Copt-level=0 //@ needs-asm-support //@ ignore-arm no "ret" mnemonic +//@ ignore-wasm32 aligning functions is not currently supported on wasm (#143368) #![crate_type = "lib"] #![feature(fn_align)] diff --git a/tests/codegen/naked-fn/min-function-alignment.rs b/tests/codegen/naked-fn/min-function-alignment.rs index 59554c1cae5..4ebaacd3eff 100644 --- a/tests/codegen/naked-fn/min-function-alignment.rs +++ b/tests/codegen/naked-fn/min-function-alignment.rs @@ -1,6 +1,7 @@ //@ compile-flags: -C no-prepopulate-passes -Copt-level=0 -Zmin-function-alignment=16 //@ needs-asm-support //@ ignore-arm no "ret" mnemonic +//@ ignore-wasm32 aligning functions is not currently supported on wasm (#143368) #![feature(fn_align)] #![crate_type = "lib"] diff --git a/tests/ui/attributes/fn-align-dyn.rs b/tests/ui/attributes/fn-align-dyn.rs index d67de05e7a9..8ba4d5e2897 100644 --- a/tests/ui/attributes/fn-align-dyn.rs +++ b/tests/ui/attributes/fn-align-dyn.rs @@ -1,4 +1,5 @@ //@ run-pass +//@ ignore-wasm32 aligning functions is not currently supported on wasm (#143368) #![feature(fn_align)] trait Test { |
