Fix a typo in #75781

This commit is contained in:
Amanieu d'Antras 2020-08-26 10:46:51 +01:00
parent 2fe9a33659
commit 178c1bbb5b
2 changed files with 6 additions and 1 deletions

View file

@ -485,7 +485,7 @@ fn reg_to_llvm(reg: InlineAsmRegOrRegClass, layout: Option<&TyAndLayout<'tcx>>)
format!("{{{}{}}}", class, idx)
} else if reg == InlineAsmReg::AArch64(AArch64InlineAsmReg::x30) {
// LLVM doesn't recognize x30
"lr".to_string()
"{lr}".to_string()
} else {
format!("{{{}}}", reg.name())
}

View file

@ -555,6 +555,11 @@ check_reg!(v0_f32x4 f32x4 "s0" "fmov");
check_reg!(v0_f64x2 f64x2 "s0" "fmov");
// Regression test for #75761
// CHECK-LABEL: issue_75761:
// CHECK: stp {{{.*}}}lr
// CHECK: //APP
// CHECK: //NO_APP
// CHECK: ldp {{{.*}}}lr
pub unsafe fn issue_75761() {
asm!("", out("v0") _, out("x30") _);
}