Rollup merge of #75781 - Amanieu:asm-fix, r=nagisa
More inline asm register name fixups for LLVM Fixes #75761 r? @nagisa
This commit is contained in:
commit
cb9ef0988e
2 changed files with 10 additions and 2 deletions
|
@ -479,10 +479,13 @@ fn reg_to_llvm(reg: InlineAsmRegOrRegClass, layout: Option<&TyAndLayout<'tcx>>)
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// We use i32 as the type for discarded outputs
|
// We use i64x2 as the type for discarded outputs
|
||||||
's'
|
'q'
|
||||||
};
|
};
|
||||||
format!("{{{}{}}}", class, idx)
|
format!("{{{}{}}}", class, idx)
|
||||||
|
} else if reg == InlineAsmReg::AArch64(AArch64InlineAsmReg::x30) {
|
||||||
|
// LLVM doesn't recognize x30
|
||||||
|
"lr".to_string()
|
||||||
} else {
|
} else {
|
||||||
format!("{{{}}}", reg.name())
|
format!("{{{}}}", reg.name())
|
||||||
}
|
}
|
||||||
|
|
|
@ -553,3 +553,8 @@ check_reg!(v0_f32x4 f32x4 "s0" "fmov");
|
||||||
// CHECK: fmov s0, s0
|
// CHECK: fmov s0, s0
|
||||||
// CHECK: //NO_APP
|
// CHECK: //NO_APP
|
||||||
check_reg!(v0_f64x2 f64x2 "s0" "fmov");
|
check_reg!(v0_f64x2 f64x2 "s0" "fmov");
|
||||||
|
|
||||||
|
// Regression test for #75761
|
||||||
|
pub unsafe fn issue_75761() {
|
||||||
|
asm!("", out("v0") _, out("x30") _);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue