Skip to content

Commit 60b7c2a

Browse files
committed
More inline asm register name fixups for LLVM
Fixes rust-lang#75761
1 parent 521db88 commit 60b7c2a

File tree

1 file changed

+5
-2
lines changed
  • src/librustc_codegen_llvm

1 file changed

+5
-2
lines changed

src/librustc_codegen_llvm/asm.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -479,10 +479,13 @@ fn reg_to_llvm(reg: InlineAsmRegOrRegClass, layout: Option<&TyAndLayout<'tcx>>)
479479
_ => unreachable!(),
480480
}
481481
} else {
482-
// We use i32 as the type for discarded outputs
483-
's'
482+
// We use i64x2 as the type for discarded outputs
483+
'q'
484484
};
485485
format!("{{{}{}}}", class, idx)
486+
} else if reg == InlineAsmReg::AArch64(AArch64InlineAsmReg::x30) {
487+
// LLVM doesn't recognize x30
488+
"lr".to_string()
486489
} else {
487490
format!("{{{}}}", reg.name())
488491
}

0 commit comments

Comments
 (0)