Skip to content

Commit

Permalink
Fix a typo in #75781
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu committed Aug 26, 2020
1 parent 2fe9a33 commit 178c1bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_codegen_llvm/asm.rs
Expand Up @@ -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())
}
Expand Down
5 changes: 5 additions & 0 deletions src/test/assembly/asm/aarch64-types.rs
Expand Up @@ -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") _);
}

0 comments on commit 178c1bb

Please sign in to comment.