Enum alure::instr::MoveOp [−][src]
pub enum MoveOp {}Show variants
MovA(RegA, Reg32, Reg32), DupA(RegA, Reg32, Reg32), SwpA(RegA, Reg32, Reg32), MovF(RegF, Reg32, Reg32), DupF(RegF, Reg32, Reg32), SwpF(RegF, Reg32, Reg32), MovR(RegR, Reg32, Reg32), DupR(RegR, Reg32, Reg32), CpyA(RegA, Reg32, RegA, Reg32), CnvA(RegA, Reg32, RegA, Reg32), CnvF(RegF, Reg32, RegF, Reg32), CpyR(RegR, Reg32, RegR, Reg32), SpyAR(RegA, Reg32, RegR, Reg32), CnvAF(RegA, Reg32, RegF, Reg32), CnvFA(RegF, Reg32, RegA, Reg32),
Expand description
Instructions moving and swapping register values
Variants
Move operation: moves value of one of the integer arithmetic registers into another integer
arithmetic register of the same bit size, clearing its previous value and setting the
source to None
.
Duplicate operation: duplicates value of one of the integer arithmetic registers into another integer arithmetic register of the same bit size, clearing its previous value.
Swap operation: swaps value of two integer arithmetic registers of the same bit size.
Move operation: moves value of one of the float arithmetic registers into another float
arithmetic register of the same bit size, clearing its previous value and setting the
source to None
.
Duplicate operation: duplicates value of one of the float arithmetic registers into another float arithmetic register of the same bit size, clearing its previous value.
Swap operation: swaps value of two float arithmetic registers of the same bit size.
Move operation: moves value of one of the general non-arithmetic registers into another
general non- arithmetic register of the same bit size, clearing its previous value and
setting the source to None
.
Duplicate operation: duplicates value of one of the general non-arithmetic registers into another general non-arithmetic register of the same bit size, clearing its previous value.
Copy operation: copies value from one of the integer arithmetic registers to a destination
register treating value as unsigned: if the value does not fit destination bit dimension,
truncates the most significant bits until they fit, setting st0
value to false
.
Otherwise, the operation sets st0
to true
.
Conversion operation: copies value from one of the integer arithmetic registers to a
destination register treating value as signed: if the value does not fit destination bit
dimension, truncates the most significant non-sign bits until they fit, setting st0
value to false
. Otherwise, fills the difference between source and destination bit length
with the value taken from the most significant source bit (sign bit) and sets st0
to
true
.
Conversion operation: converts value from one of the float arithmetic registers to a
destination register according to floating encoding rules. If the value does not fit
destination bit dimension, truncates the most significant non-sign bits until they fit,
setting st0
value to false
. Otherwise sets st0
to true
.
Copy operation: copies value from one of the general non-arithmetic registers to a
destination register. If the value does not fit destination bit dimension,
truncates the most significant bits until they fit, setting st0
value to false
.
Otherwise, extends most significant bits with zeros and sets st0
to true
.
Swap-copy operation: swaps value one of the integer arithmetic registers with a value of an
general non-arithmetic register. If any of the values do not fit destination bit
dimensions, truncates the most significant bits until they fit, setting st0
value to
false
. Otherwise, extends most significant bits with zeros and sets st0
to true
.
Conversion operation: converts value of an integer arithmetic register to a float register
according to floating encoding rules. If the value does not fit destination bit dimension,
truncates the most significant non-sign bits until they fit, setting st0
value to
false
. Otherwise sets st0
to true
.
NB: operation always treats integers as signed integers.
Conversion operation: converts value of a float arithmetic register to an integer register
according to floating encoding rules. If the value does not fit destination bit dimension,
truncates the most significant non-sign bits until they fit, setting st0
value to
false
. Otherwise sets st0
to true
.
NB: operation always treats integers as signed integers.
Trait Implementations
Returns number of bytes which instruction and its argument occupies
Returns range of instruction btecodes covered by a set of operations
Returns byte representing instruction code (without its arguments)
fn write_args<W>(&self, writer: &mut W) -> Result<(), EncodeError> where
W: Write,
EncodeError: From<<W as Write>::Error>,
[src]
fn write_args<W>(&self, writer: &mut W) -> Result<(), EncodeError> where
W: Write,
EncodeError: From<<W as Write>::Error>,
[src]Writes instruction arguments as bytecode, omitting instruction code byte
fn read<R>(reader: &mut R) -> Result<Self, DecodeError> where
R: Read,
DecodeError: From<<R as Read>::Error>,
[src]
fn read<R>(reader: &mut R) -> Result<Self, DecodeError> where
R: Read,
DecodeError: From<<R as Read>::Error>,
[src]Reads the instruction from bytecode
fn write<W>(&self, writer: &mut W) -> Result<(), EncodeError> where
W: Write,
EncodeError: From<<W as Write>::Error>,
[src]
fn write<W>(&self, writer: &mut W) -> Result<(), EncodeError> where
W: Write,
EncodeError: From<<W as Write>::Error>,
[src]Writes the instruction as bytecode
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for MoveOp
impl UnwindSafe for MoveOp
Blanket Implementations
Mutably borrows from an owned value. Read more