From 60b7c2aaefebe2ea6819414ebaf6e374031fc76d Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Fri, 21 Aug 2020 18:42:06 +0100 Subject: [PATCH] More inline asm register name fixups for LLVM Fixes #75761 --- src/librustc_codegen_llvm/asm.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/librustc_codegen_llvm/asm.rs b/src/librustc_codegen_llvm/asm.rs index a6062de6bf8..4fef94dde5f 100644 --- a/src/librustc_codegen_llvm/asm.rs +++ b/src/librustc_codegen_llvm/asm.rs @@ -479,10 +479,13 @@ fn reg_to_llvm(reg: InlineAsmRegOrRegClass, layout: Option<&TyAndLayout<'tcx>>) _ => unreachable!(), } } else { - // We use i32 as the type for discarded outputs - 's' + // We use i64x2 as the type for discarded outputs + 'q' }; format!("{{{}{}}}", class, idx) + } else if reg == InlineAsmReg::AArch64(AArch64InlineAsmReg::x30) { + // LLVM doesn't recognize x30 + "lr".to_string() } else { format!("{{{}}}", reg.name()) }