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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user