Skip to content

Commit

Permalink
Rollup merge of rust-lang#75939 - Amanieu:fix_asm2, r=nagisa
Browse files Browse the repository at this point in the history
Fix a typo in rust-lang#75781
  • Loading branch information
pietroalbini authored Aug 28, 2020
2 parents e30a8d4 + 178c1bb commit a53fdbe
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 a53fdbe

Please sign in to comment.