Skip to content

Commit 178c1bb

Browse files
committed
Fix a typo in rust-lang#75781
1 parent 2fe9a33 commit 178c1bb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/librustc_codegen_llvm/asm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ fn reg_to_llvm(reg: InlineAsmRegOrRegClass, layout: Option<&TyAndLayout<'tcx>>)
485485
format!("{{{}{}}}", class, idx)
486486
} else if reg == InlineAsmReg::AArch64(AArch64InlineAsmReg::x30) {
487487
// LLVM doesn't recognize x30
488-
"lr".to_string()
488+
"{lr}".to_string()
489489
} else {
490490
format!("{{{}}}", reg.name())
491491
}

src/test/assembly/asm/aarch64-types.rs

+5
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,11 @@ check_reg!(v0_f32x4 f32x4 "s0" "fmov");
555555
check_reg!(v0_f64x2 f64x2 "s0" "fmov");
556556

557557
// Regression test for #75761
558+
// CHECK-LABEL: issue_75761:
559+
// CHECK: stp {{{.*}}}lr
560+
// CHECK: //APP
561+
// CHECK: //NO_APP
562+
// CHECK: ldp {{{.*}}}lr
558563
pub unsafe fn issue_75761() {
559564
asm!("", out("v0") _, out("x30") _);
560565
}

0 commit comments

Comments
 (0)