Skip to content

Commit 576bcfc

Browse files
committed
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.
1 parent 9fb94b3 commit 576bcfc

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎compiler/rustc_ast_lowering/src/asm.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
3838
}
3939
ifletSome(asm_arch) = asm_arch {
4040
// Inline assembly is currently only stable for these architectures.
41+
// (See also compiletest's `has_asm_support`.)
4142
let is_stable = matches!(
4243
asm_arch,
4344
asm::InlineAsmArch::X86

‎src/tools/compiletest/src/common.rs‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,17 @@ impl Config {
481481
}
482482

483483
pubfnhas_asm_support(&self) -> bool{
484+
// This should match the stable list in `LoweringContext::lower_inline_asm`.
484485
staticASM_SUPPORTED_ARCHS:&[&str] = &[
485-
"x86","x86_64","arm","aarch64","riscv32",
486+
"x86",
487+
"x86_64",
488+
"arm",
489+
"aarch64",
490+
"arm64ec",
491+
"riscv32",
486492
"riscv64",
493+
"loongarch64",
494+
"s390x",
487495
// These targets require an additional asm_experimental_arch feature.
488496
// "nvptx64", "hexagon", "mips", "mips64", "spirv", "wasm32",
489497
];

0 commit comments

Comments
 (0)