binaryninja::low_level_il

Enum LowLevelILSSARegisterKind

source
pub enum LowLevelILSSARegisterKind<R: ArchReg> {
    Full(LowLevelILSSARegister<R>),
    Partial {
        full_reg: LowLevelILSSARegister<R>,
        partial_reg: CoreRegister,
    },
}
Expand description

The kind of SSA register.

An SSA register can exist in two states:

  • Full, e.g. eax on x86
  • Partial, e.g. al on x86

If you intend to query for the ssa uses or definitions you must retrieve the physical register using the function LowLevelILSSARegisterKind::physical_reg which will give you the actual LowLevelILSSARegister.

Variants§

§

Full(LowLevelILSSARegister<R>)

A full register is one that is not aliasing another, such as eax on x86 or rax on x86_64.

§

Partial

Fields

§full_reg: LowLevelILSSARegister<R>

This is the non-aliased register.

This register is what is used for dataflow, otherwise the backing storage of aliased registers like al on x86 would contain separate value information from the physical register eax.

NOTE: While this is a LowLevelILSSARegister temporary registers are not allowed in partial assignments, so this will always be an actual architecture register.

§partial_reg: CoreRegister

This is the aliased register.

On x86 if the register al is used that would be considered a partial register, with the full register eax being used as the backing storage.

Implementations§

source§

impl<R: ArchReg> LowLevelILSSARegisterKind<R>

source

pub fn new_full(kind: LowLevelILRegisterKind<R>, version: u32) -> Self

source

pub fn new_partial( full_reg: LowLevelILRegisterKind<R>, version: u32, partial_reg: CoreRegister, ) -> Self

source

pub fn physical_reg(&self) -> LowLevelILSSARegister<R>

This is the non-aliased register used. This should be called when you intend to actually query for SSA dataflow information, as a partial register is prohibited from being used.

§Example

On x86 al in the LLIL SSA will have a physical register of eax.

source

pub fn name(&self) -> Cow<'_, str>

Gets the displayable register, for partial this will be the partial register name.

§Example

On x86 this will display “al” not “eax”.

Trait Implementations§

source§

impl<R: ArchReg> AsRef<LowLevelILSSARegister<R>> for LowLevelILSSARegisterKind<R>

source§

fn as_ref(&self) -> &LowLevelILSSARegister<R>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<R: Clone + ArchReg> Clone for LowLevelILSSARegisterKind<R>

source§

fn clone(&self) -> LowLevelILSSARegisterKind<R>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<R: Debug + ArchReg> Debug for LowLevelILSSARegisterKind<R>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<R: ArchReg> From<LowLevelILSSARegister<R>> for LowLevelILSSARegisterKind<R>

source§

fn from(value: LowLevelILSSARegister<R>) -> Self

Converts to this type from the input type.
source§

impl<R: ArchReg> From<LowLevelILSSARegisterKind<R>> for LowLevelILSSARegister<R>

source§

fn from(value: LowLevelILSSARegisterKind<R>) -> Self

Converts to this type from the input type.
source§

impl<R: Copy + ArchReg> Copy for LowLevelILSSARegisterKind<R>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit #126799)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.