Enum rustc_target::asm::InlineAsmRegClass
source · pub enum InlineAsmRegClass {
Show 18 variants
X86(X86InlineAsmRegClass),
Arm(ArmInlineAsmRegClass),
AArch64(AArch64InlineAsmRegClass),
RiscV(RiscVInlineAsmRegClass),
Nvptx(NvptxInlineAsmRegClass),
PowerPC(PowerPCInlineAsmRegClass),
Hexagon(HexagonInlineAsmRegClass),
LoongArch(LoongArchInlineAsmRegClass),
Mips(MipsInlineAsmRegClass),
S390x(S390xInlineAsmRegClass),
SpirV(SpirVInlineAsmRegClass),
Wasm(WasmInlineAsmRegClass),
Bpf(BpfInlineAsmRegClass),
Avr(AvrInlineAsmRegClass),
Msp430(Msp430InlineAsmRegClass),
M68k(M68kInlineAsmRegClass),
CSKY(CSKYInlineAsmRegClass),
Err,
}
Variants§
X86(X86InlineAsmRegClass)
Arm(ArmInlineAsmRegClass)
AArch64(AArch64InlineAsmRegClass)
RiscV(RiscVInlineAsmRegClass)
Nvptx(NvptxInlineAsmRegClass)
PowerPC(PowerPCInlineAsmRegClass)
Hexagon(HexagonInlineAsmRegClass)
LoongArch(LoongArchInlineAsmRegClass)
Mips(MipsInlineAsmRegClass)
S390x(S390xInlineAsmRegClass)
SpirV(SpirVInlineAsmRegClass)
Wasm(WasmInlineAsmRegClass)
Bpf(BpfInlineAsmRegClass)
Avr(AvrInlineAsmRegClass)
Msp430(Msp430InlineAsmRegClass)
M68k(M68kInlineAsmRegClass)
CSKY(CSKYInlineAsmRegClass)
Err
Implementations§
source§impl 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§
source§impl Clone for InlineAsmRegClass
impl Clone for InlineAsmRegClass
source§fn clone(&self) -> InlineAsmRegClass
fn clone(&self) -> InlineAsmRegClass
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InlineAsmRegClass
impl Debug for InlineAsmRegClass
source§impl<__D: Decoder> Decodable<__D> for InlineAsmRegClass
impl<__D: Decoder> Decodable<__D> for InlineAsmRegClass
source§impl<__E: Encoder> Encodable<__E> for InlineAsmRegClass
impl<__E: Encoder> Encodable<__E> for InlineAsmRegClass
source§impl Hash for InlineAsmRegClass
impl Hash for InlineAsmRegClass
source§impl<__CTX> HashStable<__CTX> for InlineAsmRegClasswhere
__CTX: HashStableContext,
impl<__CTX> HashStable<__CTX> for InlineAsmRegClasswhere __CTX: HashStableContext,
fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)
source§impl PartialEq<InlineAsmRegClass> for InlineAsmRegClass
impl PartialEq<InlineAsmRegClass> for InlineAsmRegClass
source§fn eq(&self, other: &InlineAsmRegClass) -> bool
fn eq(&self, other: &InlineAsmRegClass) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<InlineAsmRegClass> for InlineAsmRegClass
impl PartialOrd<InlineAsmRegClass> for InlineAsmRegClass
source§fn partial_cmp(&self, other: &InlineAsmRegClass) -> Option<Ordering>
fn partial_cmp(&self, other: &InlineAsmRegClass) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl 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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
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
: 1 byteLoongArch
: 1 byteMips
: 1 byteS390x
: 1 byteSpirV
: 1 byteWasm
: 1 byteBpf
: 1 byteAvr
: 1 byteMsp430
: 1 byteM68k
: 1 byteCSKY
: 1 byteErr
: 0 bytes