Rollup merge of #82270 - asquared31415:asm-syntax-directive-errors, r=nagisa
Emit error when trying to use assembler syntax directives in `asm!` The `.intel_syntax` and `.att_syntax` assembler directives should not be used, in favor of not specifying a syntax for intel, and in favor of the explicit `att_syntax` option using the inline assembly options. Closes #79869
This commit is contained in:
commit
16f6583f2d
5 changed files with 181 additions and 1 deletions
|
@ -793,6 +793,13 @@ impl Session {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn inline_asm_dialect(&self) -> rustc_ast::LlvmAsmDialect {
|
||||
match self.asm_arch {
|
||||
Some(InlineAsmArch::X86 | InlineAsmArch::X86_64) => rustc_ast::LlvmAsmDialect::Intel,
|
||||
_ => rustc_ast::LlvmAsmDialect::Att,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn relocation_model(&self) -> RelocModel {
|
||||
self.opts.cg.relocation_model.unwrap_or(self.target.relocation_model)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue