Rollup merge of #91643 - Amanieu:r9x18, r=joshtriplett
asm: Allow using r9 (ARM) and x18 (AArch64) if they are not reserved by the current target This supersedes https://github.com/rust-lang/rust/pull/88879. cc `@Skirmisher` r? `@joshtriplett`
This commit is contained in:
commit
443ed7c620
7 changed files with 83 additions and 28 deletions
|
@ -64,7 +64,12 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
|||
let mut clobber_abis = FxHashMap::default();
|
||||
if let Some(asm_arch) = asm_arch {
|
||||
for (abi_name, abi_span) in &asm.clobber_abis {
|
||||
match asm::InlineAsmClobberAbi::parse(asm_arch, &self.sess.target, *abi_name) {
|
||||
match asm::InlineAsmClobberAbi::parse(
|
||||
asm_arch,
|
||||
|feature| self.sess.target_features.contains(&Symbol::intern(feature)),
|
||||
&self.sess.target,
|
||||
*abi_name,
|
||||
) {
|
||||
Ok(abi) => {
|
||||
// If the abi was already in the list, emit an error
|
||||
match clobber_abis.get(&abi) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue