Enum probe_rs_target::InstructionSet
source · pub enum InstructionSet {
Thumb2,
A32,
A64,
RV32,
RV32C,
Xtensa,
}
Expand description
Instruction set used by a core
Variants§
Thumb2
ARM Thumb 2 instruction set
A32
ARM A32 (often just called ARM) instruction set
A64
ARM A64 (aarch64) instruction set
RV32
RISC-V 32-bit uncompressed instruction sets (RV32) - covers all ISA variants that use 32-bit instructions.
RV32C
RISC-V 32-bit compressed instruction sets (RV32C) - covers all ISA variants that allow compressed 16-bit instructions.
Xtensa
Xtensa instruction set
Implementations§
source§impl InstructionSet
impl InstructionSet
sourcepub fn from_target_triple(triple: &str) -> Option<Self>
pub fn from_target_triple(triple: &str) -> Option<Self>
Get the instruction set from a rustc target triple.
sourcepub fn get_minimum_instruction_size(&self) -> u8
pub fn get_minimum_instruction_size(&self) -> u8
Get the minimum instruction size in bytes.
sourcepub fn get_maximum_instruction_size(&self) -> u8
pub fn get_maximum_instruction_size(&self) -> u8
Get the maximum instruction size in bytes. All supported architectures have a maximum instruction size of 4 bytes.
sourcepub fn is_compatible(&self, instr_set: InstructionSet) -> bool
pub fn is_compatible(&self, instr_set: InstructionSet) -> bool
Returns whether a CPU with the self
instruction set is compatible with a program compiled for instr_set
.
Trait Implementations§
source§impl Clone for InstructionSet
impl Clone for InstructionSet
source§fn clone(&self) -> InstructionSet
fn clone(&self) -> InstructionSet
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for InstructionSet
impl Debug for InstructionSet
source§impl<'de> Deserialize<'de> for InstructionSet
impl<'de> Deserialize<'de> for InstructionSet
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for InstructionSet
impl PartialEq for InstructionSet
source§fn eq(&self, other: &InstructionSet) -> bool
fn eq(&self, other: &InstructionSet) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for InstructionSet
impl Serialize for InstructionSet
impl Copy for InstructionSet
impl Eq for InstructionSet
impl StructuralPartialEq for InstructionSet
Auto Trait Implementations§
impl Freeze for InstructionSet
impl RefUnwindSafe for InstructionSet
impl Send for InstructionSet
impl Sync for InstructionSet
impl Unpin for InstructionSet
impl UnwindSafe for InstructionSet
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
Mutably borrows from an owned value. Read more