Skip to content

Commit 6bcaf65

Browse files
authored
Rollup merge of rust-lang#138371 - cuviper:stable-asm-test, r=jieyouxu
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.
2 parents 06a93ec + 576bcfc commit 6bcaf65

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

compiler/rustc_ast_lowering/src/asm.rs

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
3838
}
3939
if let Some(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

+9-1
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,17 @@ impl Config {
481481
}
482482

483483
pub fn has_asm_support(&self) -> bool {
484+
// This should match the stable list in `LoweringContext::lower_inline_asm`.
484485
static ASM_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)