diff options
| author | Josh Stone <jistone@redhat.com> | 2025-03-11 13:48:08 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2025-03-11 15:42:33 -0700 |
| commit | 576bcfcd4e094fa59aff6efe8c27c871a135c805 (patch) | |
| tree | c020bdd14f72015a47efa00429cb8bee1459fdc4 | |
| parent | 9fb94b32df38073bf63d009df77ed10cb1c989d0 (diff) | |
| download | rust-576bcfcd4e094fa59aff6efe8c27c871a135c805.tar.gz rust-576bcfcd4e094fa59aff6efe8c27c871a135c805.zip | |
Update compiletest's `has_asm_support` to match rustc
The list of `ASM_SUPPORTED_ARCHS` was missing a few from the compiler's actual stable list.
| -rw-r--r-- | compiler/rustc_ast_lowering/src/asm.rs | 1 | ||||
| -rw-r--r-- | src/tools/compiletest/src/common.rs | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/compiler/rustc_ast_lowering/src/asm.rs b/compiler/rustc_ast_lowering/src/asm.rs index 87af7959a88..65784af92c7 100644 --- a/compiler/rustc_ast_lowering/src/asm.rs +++ b/compiler/rustc_ast_lowering/src/asm.rs @@ -38,6 +38,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { } if let Some(asm_arch) = asm_arch { // Inline assembly is currently only stable for these architectures. + // (See also compiletest's `has_asm_support`.) let is_stable = matches!( asm_arch, asm::InlineAsmArch::X86 diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs index 978836cb663..08d3c1c343e 100644 --- a/src/tools/compiletest/src/common.rs +++ b/src/tools/compiletest/src/common.rs @@ -481,9 +481,17 @@ impl Config { } pub fn has_asm_support(&self) -> bool { + // This should match the stable list in `LoweringContext::lower_inline_asm`. static ASM_SUPPORTED_ARCHS: &[&str] = &[ - "x86", "x86_64", "arm", "aarch64", "riscv32", + "x86", + "x86_64", + "arm", + "aarch64", + "arm64ec", + "riscv32", "riscv64", + "loongarch64", + "s390x", // These targets require an additional asm_experimental_arch feature. // "nvptx64", "hexagon", "mips", "mips64", "spirv", "wasm32", ]; |
