[][src]Trait falcon::memory::Value

pub trait Value: Clone + Debug + Eq + PartialEq {
    fn constant(constant: Constant) -> Self;
fn bits(&self) -> usize;
fn shl(&self, bits: usize) -> Result<Self>;
fn shr(&self, bits: usize) -> Result<Self>;
fn trun(&self, bits: usize) -> Result<Self>;
fn zext(&self, bits: usize) -> Result<Self>;
fn or(&self, other: &Self) -> Result<Self>; }

In order for a value to be used in the paged memory model, it must implement this trait.

Required methods

fn constant(constant: Constant) -> Self

Turn an il::Constant into a representation of this Value

fn bits(&self) -> usize

Return the number of bits contained in this value

fn shl(&self, bits: usize) -> Result<Self>

Shift the value left by the given number of bits

fn shr(&self, bits: usize) -> Result<Self>

Shift the value right by the given number of bits

fn trun(&self, bits: usize) -> Result<Self>

Truncate the value to the given number of bits

fn zext(&self, bits: usize) -> Result<Self>

Zero-extend the value to the given number of bits

fn or(&self, other: &Self) -> Result<Self>

Or this value with the given value

Loading content...

Implementors

impl Value for Expression[src]

impl Value for Constant[src]

Loading content...