]> git.lizzy.rs Git - rust.git/commitdiff
Fix a typo in #75781
authorAmanieu d'Antras <amanieu@gmail.com>
Wed, 26 Aug 2020 09:46:51 +0000 (10:46 +0100)
committerAmanieu d'Antras <amanieu@gmail.com>
Wed, 26 Aug 2020 09:49:15 +0000 (10:49 +0100)
src/librustc_codegen_llvm/asm.rs
src/test/assembly/asm/aarch64-types.rs

index 4fef94dde5f7a3f41dc60a31cceff88262bd3172..a468d09c2d93d57e2e1a7ba9434833db66286c68 100644 (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())
             }
index e39f74c916c4ad4a7a233a10c701b2ba1ec39621..73bf369e2dacdbb71739aebb834307c2acd245a9 100644 (file)
@@ -555,6 +555,11 @@ pub unsafe fn $func(x: $ty) -> $ty {
 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") _);
 }