pub struct Alternate {
pub feature: Feature,
pub name: String,
}
Expand description
An alternate version of an instruction.
Some AVX-specific context: some instructions have the same semantics in their SSE and AVX encodings. In these cases, we use this structure to record the name of the upgraded version of the instruction, allowing us to replace the SSE instruction with its AVX version during lowering. For AVX, using the VEX-encoded instruction is typically better than its legacy SSE version:
- VEX can encode three operands
- VEX allows unaligned memory access (avoids additional
MOVUPS
) - VEX can compact byte-long prefixes into the VEX prefix
- VEX instructions zero the upper bits of XMM registers by default
Fields§
§feature: Feature
Indicate the feature check to use to trigger the replacement.
name: String
The full name (see Inst::name
) of the instruction used for
replacement.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Alternate
impl RefUnwindSafe for Alternate
impl Send for Alternate
impl Sync for Alternate
impl Unpin for Alternate
impl UnwindSafe for Alternate
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