More inline asm register name fixups for LLVM

Fixes #75761
This commit is contained in:
Amanieu d'Antras 2020-08-21 18:42:06 +01:00
parent 521db88cd9
commit 60b7c2aaef

View File

@ -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())
}