Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update compiletest's has_asm_support to match rustc #138371

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler/rustc_ast_lowering/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion src/tools/compiletest/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
];
Expand Down
Loading