Merge pull request #1587 from rust-lang/asm_fixes
Some fixes for inline asm
This commit is contained in:
commit
5782b21cef
2 changed files with 3 additions and 14 deletions
|
|
@ -202,6 +202,9 @@ pub(crate) fn compile_global_asm(
|
|||
return Err(format!("Failed to assemble `{}`", global_asm));
|
||||
}
|
||||
} else {
|
||||
// Escape { and }
|
||||
let global_asm = global_asm.replace('{', "{{").replace('}', "}}");
|
||||
|
||||
let mut child = Command::new(std::env::current_exe().unwrap())
|
||||
// Avoid a warning about the jobserver fd not being passed
|
||||
.env_remove("CARGO_MAKEFLAGS")
|
||||
|
|
|
|||
|
|
@ -568,20 +568,6 @@ impl<'tcx> InlineAssemblyGenerator<'_, 'tcx> {
|
|||
.emit(&mut generated_asm, InlineAsmArch::X86_64, *modifier)
|
||||
.unwrap(),
|
||||
},
|
||||
InlineAsmArch::AArch64 => match reg {
|
||||
InlineAsmReg::AArch64(reg) if reg.vreg_index().is_some() => {
|
||||
// rustc emits v0 rather than q0
|
||||
reg.emit(
|
||||
&mut generated_asm,
|
||||
InlineAsmArch::AArch64,
|
||||
Some(modifier.unwrap_or('q')),
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
_ => reg
|
||||
.emit(&mut generated_asm, InlineAsmArch::AArch64, *modifier)
|
||||
.unwrap(),
|
||||
},
|
||||
_ => reg.emit(&mut generated_asm, self.arch, *modifier).unwrap(),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue