Enum lief::pe::exception_x64::UnwindOpcodes
pub enum UnwindOpcodes {
PUSH_NONVOL,
ALLOC_LARGE,
ALLOC_SMALL,
SET_FPREG,
SAVE_NONVOL,
SAVE_NONVOL_FAR,
EPILOG,
SPARE,
SAVE_XMM128,
SAVE_XMM128_FAR,
PUSH_MACHFRAME,
UNKNOWN(u32),
}
Variants§
PUSH_NONVOL
Push a nonvolatile integer register, decrementing RSP by 8.
The operation info is the number of the register. Because of the
constraints on epilogs, PUSH_NONVOL
unwind codes must appear first
in the prolog and correspondingly, last in the unwind code array.
This relative ordering applies to all other unwind codes except
UnwindOpcodes::PUSH_MACHFRAME
.
ALLOC_LARGE
Allocate a large-sized area on the stack. There are two forms. If the operation info equals 0, then the size of the allocation divided by 8 is recorded in the next slot, allowing an allocation up to 512K - 8. If the operation info equals 1, then the unscaled size of the allocation is recorded in the next two slots in little-endian format, allowing allocations up to 4GB - 8.
ALLOC_SMALL
Allocate a small-sized area on the stack. The size of the allocation is the operation info field * 8 + 8, allowing allocations from 8 to 128 bytes.
SET_FPREG
Establish the frame pointer register by setting the register to some offset of the current RSP. The offset is equal to the Frame Register offset (scaled) field in the UNWIND_INFO * 16, allowing offsets from 0 to 240. The use of an offset permits establishing a frame pointer that points to the middle of the fixed stack allocation, helping code density by allowing more accesses to use short instruction forms. The operation info field is reserved and shouldn’t be us
SAVE_NONVOL
Save a nonvolatile integer register on the stack using a MOV instead of a PUSH. This code is primarily used for shrink-wrapping, where a nonvolatile register is saved to the stack in a position that was previously allocated. The operation info is the number of the register. The scaled-by-8 stack offset is recorded in the next unwind operation code slot, as described in the note above
SAVE_NONVOL_FAR
Save a nonvolatile integer register on the stack with a long offset, using a MOV instead of a PUSH. This code is primarily used for shrink-wrapping, where a nonvolatile register is saved to the stack in a position that was previously allocated. The operation info is the number of the register. The unscaled stack offset is recorded in the next two unwind operation code slots, as described in the note above.
EPILOG
This entry is only revelant for version 2. It describes the function epilog.
SPARE
Reserved Originally SAVE_XMM128_FAR in version 1, but deprecated and removed
SAVE_XMM128
Save all 128 bits of a nonvolatile XMM register on the stack. The operation info is the number of the register. The scaled-by-16 stack offset is recorded in the next slot.
SAVE_XMM128_FAR
Save all 128 bits of a nonvolatile XMM register on the stack with a long offset. The operation info is the number of the register. The unscaled stack offset is recorded in the next two slots.
PUSH_MACHFRAME
Push a machine frame. This unwind code is used to record the effect of a hardware interrupt or exception.
UNKNOWN(u32)
Trait Implementations§
§impl Clone for UnwindOpcodes
impl Clone for UnwindOpcodes
§fn clone(&self) -> UnwindOpcodes
fn clone(&self) -> UnwindOpcodes
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for UnwindOpcodes
impl Debug for UnwindOpcodes
§impl From<UnwindOpcodes> for u32
impl From<UnwindOpcodes> for u32
§fn from(value: UnwindOpcodes) -> u32
fn from(value: UnwindOpcodes) -> u32
§impl From<u32> for UnwindOpcodes
impl From<u32> for UnwindOpcodes
§impl Hash for UnwindOpcodes
impl Hash for UnwindOpcodes
§impl PartialEq<UnwindOpcodes> for UnwindOpcodes
impl PartialEq<UnwindOpcodes> for UnwindOpcodes
§fn eq(&self, other: &UnwindOpcodes) -> bool
fn eq(&self, other: &UnwindOpcodes) -> bool
self
and other
values to be equal, and is used
by ==
.