Enum rustc_target::asm::InlineAsmRegClass
source · [−]pub enum InlineAsmRegClass {
Show 15 variants
X86(X86InlineAsmRegClass),
Arm(ArmInlineAsmRegClass),
AArch64(AArch64InlineAsmRegClass),
RiscV(RiscVInlineAsmRegClass),
Nvptx(NvptxInlineAsmRegClass),
PowerPC(PowerPCInlineAsmRegClass),
Hexagon(HexagonInlineAsmRegClass),
Mips(MipsInlineAsmRegClass),
S390x(S390xInlineAsmRegClass),
SpirV(SpirVInlineAsmRegClass),
Wasm(WasmInlineAsmRegClass),
Bpf(BpfInlineAsmRegClass),
Avr(AvrInlineAsmRegClass),
Msp430(Msp430InlineAsmRegClass),
Err,
}Variants
X86(X86InlineAsmRegClass)
Arm(ArmInlineAsmRegClass)
AArch64(AArch64InlineAsmRegClass)
RiscV(RiscVInlineAsmRegClass)
Nvptx(NvptxInlineAsmRegClass)
PowerPC(PowerPCInlineAsmRegClass)
Hexagon(HexagonInlineAsmRegClass)
Mips(MipsInlineAsmRegClass)
S390x(S390xInlineAsmRegClass)
SpirV(SpirVInlineAsmRegClass)
Wasm(WasmInlineAsmRegClass)
Bpf(BpfInlineAsmRegClass)
Avr(AvrInlineAsmRegClass)
Msp430(Msp430InlineAsmRegClass)
Err
Implementations
sourceimpl InlineAsmRegClass
impl InlineAsmRegClass
pub fn name(self) -> Symbol
sourcepub fn suggest_class(
self,
arch: InlineAsmArch,
ty: InlineAsmType
) -> Option<Self>
pub fn suggest_class(
self,
arch: InlineAsmArch,
ty: InlineAsmType
) -> Option<Self>
Returns a suggested register class to use for this type. This is called
when supported_types fails to give a better error
message to the user.
sourcepub fn suggest_modifier(
self,
arch: InlineAsmArch,
ty: InlineAsmType
) -> Option<(char, &'static str)>
pub fn suggest_modifier(
self,
arch: InlineAsmArch,
ty: InlineAsmType
) -> Option<(char, &'static str)>
Returns a suggested template modifier to use for this type and an example of a register named formatted with it.
Such suggestions are useful if a type smaller than the full register size is used and a modifier can be used to point to the subregister of the correct size.
sourcepub fn default_modifier(
self,
arch: InlineAsmArch
) -> Option<(char, &'static str)>
pub fn default_modifier(
self,
arch: InlineAsmArch
) -> Option<(char, &'static str)>
Returns the default modifier for this register and an example of a register named formatted with it.
This is only needed when the register class can suggest a modifier, so that the user can be shown how to get the default behavior without a warning.
sourcepub fn supported_types(
self,
arch: InlineAsmArch
) -> &'static [(InlineAsmType, Option<Symbol>)]
pub fn supported_types(
self,
arch: InlineAsmArch
) -> &'static [(InlineAsmType, Option<Symbol>)]
Returns a list of supported types for this register class, each with an options target feature required to use this type.
pub fn parse(arch: InlineAsmArch, name: Symbol) -> Result<Self, &'static str>
sourcepub fn valid_modifiers(self, arch: InlineAsmArch) -> &'static [char]
pub fn valid_modifiers(self, arch: InlineAsmArch) -> &'static [char]
Returns the list of template modifiers that can be used with this register class.
sourcepub fn is_clobber_only(self, arch: InlineAsmArch) -> bool
pub fn is_clobber_only(self, arch: InlineAsmArch) -> bool
Returns whether registers in this class can only be used as clobbers and not as inputs/outputs.
Trait Implementations
sourceimpl Clone for InlineAsmRegClass
impl Clone for InlineAsmRegClass
sourcefn clone(&self) -> InlineAsmRegClass
fn clone(&self) -> InlineAsmRegClass
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for InlineAsmRegClass
impl Debug for InlineAsmRegClass
sourceimpl<__D: Decoder> Decodable<__D> for InlineAsmRegClass
impl<__D: Decoder> Decodable<__D> for InlineAsmRegClass
sourceimpl<__E: Encoder> Encodable<__E> for InlineAsmRegClass
impl<__E: Encoder> Encodable<__E> for InlineAsmRegClass
sourceimpl Hash for InlineAsmRegClass
impl Hash for InlineAsmRegClass
sourceimpl<__CTX> HashStable<__CTX> for InlineAsmRegClass where
__CTX: HashStableContext,
impl<__CTX> HashStable<__CTX> for InlineAsmRegClass where
__CTX: HashStableContext,
fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)
sourceimpl PartialEq<InlineAsmRegClass> for InlineAsmRegClass
impl PartialEq<InlineAsmRegClass> for InlineAsmRegClass
sourcefn eq(&self, other: &InlineAsmRegClass) -> bool
fn eq(&self, other: &InlineAsmRegClass) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &InlineAsmRegClass) -> bool
fn ne(&self, other: &InlineAsmRegClass) -> bool
This method tests for !=.
sourceimpl PartialOrd<InlineAsmRegClass> for InlineAsmRegClass
impl PartialOrd<InlineAsmRegClass> for InlineAsmRegClass
sourcefn partial_cmp(&self, other: &InlineAsmRegClass) -> Option<Ordering>
fn partial_cmp(&self, other: &InlineAsmRegClass) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Copy for InlineAsmRegClass
impl Eq for InlineAsmRegClass
impl StructuralEq for InlineAsmRegClass
impl StructuralPartialEq for InlineAsmRegClass
Auto Trait Implementations
impl RefUnwindSafe for InlineAsmRegClass
impl Send for InlineAsmRegClass
impl Sync for InlineAsmRegClass
impl Unpin for InlineAsmRegClass
impl UnwindSafe for InlineAsmRegClass
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 2 bytes
Size for each variant:
X86: 1 byteArm: 1 byteAArch64: 1 byteRiscV: 1 byteNvptx: 1 bytePowerPC: 1 byteHexagon: 0 bytesMips: 1 byteS390x: 1 byteSpirV: 0 bytesWasm: 0 bytesBpf: 1 byteAvr: 1 byteMsp430: 0 bytesErr: 0 bytes