Rollup merge of #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.
This commit is contained in:
Matthias Krüger 2025-03-13 11:28:34 +01:00 committed by GitHub
commit 459d5b5807
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View file

@ -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

View file

@ -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",
];