Implement the instruction_set attribute
This commit is contained in:
parent
4437b4b150
commit
a6e2b636e6
22 changed files with 247 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
use crate::mir::mono::Linkage;
|
||||
use rustc_attr::{InlineAttr, OptimizeAttr};
|
||||
use rustc_attr::{InlineAttr, InstructionSetAttr, OptimizeAttr};
|
||||
use rustc_session::config::SanitizerSet;
|
||||
use rustc_span::symbol::Symbol;
|
||||
|
||||
|
@ -34,6 +34,10 @@ pub struct CodegenFnAttrs {
|
|||
/// The `#[no_sanitize(...)]` attribute. Indicates sanitizers for which
|
||||
/// instrumentation should be disabled inside the annotated function.
|
||||
pub no_sanitize: SanitizerSet,
|
||||
/// The `#[instruction_set(set)]` attribute. Indicates if the generated code should
|
||||
/// be generated against a specific instruction set. Only usable on architectures which allow
|
||||
/// switching between multiple instruction sets.
|
||||
pub instruction_set: Option<InstructionSetAttr>,
|
||||
}
|
||||
|
||||
bitflags! {
|
||||
|
@ -98,6 +102,7 @@ impl CodegenFnAttrs {
|
|||
linkage: None,
|
||||
link_section: None,
|
||||
no_sanitize: SanitizerSet::empty(),
|
||||
instruction_set: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue