ARM: Only allow using d16-d31 with asm! when supported by the target
Support can be determined by checking for the "d32" LLVM feature.
This commit is contained in:
parent
1204400ab8
commit
7cee1b4aeb
3 changed files with 6 additions and 1 deletions
|
@ -36,6 +36,7 @@ const ARM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
|
||||||
// #[target_feature].
|
// #[target_feature].
|
||||||
("thumb-mode", Some(sym::arm_target_feature)),
|
("thumb-mode", Some(sym::arm_target_feature)),
|
||||||
("thumb2", Some(sym::arm_target_feature)),
|
("thumb2", Some(sym::arm_target_feature)),
|
||||||
|
("d32", Some(sym::arm_target_feature)),
|
||||||
];
|
];
|
||||||
|
|
||||||
const AARCH64_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
|
const AARCH64_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
|
||||||
|
|
|
@ -539,6 +539,7 @@ symbols! {
|
||||||
custom_inner_attributes,
|
custom_inner_attributes,
|
||||||
custom_test_frameworks,
|
custom_test_frameworks,
|
||||||
d,
|
d,
|
||||||
|
d32,
|
||||||
dbg_macro,
|
dbg_macro,
|
||||||
dead_code,
|
dead_code,
|
||||||
dealloc,
|
dealloc,
|
||||||
|
|
|
@ -50,9 +50,12 @@ impl ArmInlineAsmRegClass {
|
||||||
match self {
|
match self {
|
||||||
Self::reg => types! { _: I8, I16, I32, F32; },
|
Self::reg => types! { _: I8, I16, I32, F32; },
|
||||||
Self::sreg | Self::sreg_low16 => types! { vfp2: I32, F32; },
|
Self::sreg | Self::sreg_low16 => types! { vfp2: I32, F32; },
|
||||||
Self::dreg | Self::dreg_low16 | Self::dreg_low8 => types! {
|
Self::dreg_low16 | Self::dreg_low8 => types! {
|
||||||
vfp2: I64, F64, VecI8(8), VecI16(4), VecI32(2), VecI64(1), VecF32(2);
|
vfp2: I64, F64, VecI8(8), VecI16(4), VecI32(2), VecI64(1), VecF32(2);
|
||||||
},
|
},
|
||||||
|
Self::dreg => types! {
|
||||||
|
d32: I64, F64, VecI8(8), VecI16(4), VecI32(2), VecI64(1), VecF32(2);
|
||||||
|
},
|
||||||
Self::qreg | Self::qreg_low8 | Self::qreg_low4 => types! {
|
Self::qreg | Self::qreg_low8 | Self::qreg_low4 => types! {
|
||||||
neon: VecI8(16), VecI16(8), VecI32(4), VecI64(2), VecF32(4);
|
neon: VecI8(16), VecI16(8), VecI32(4), VecI64(2), VecF32(4);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue