Enum framehop::x86_64::UnwindRuleX86_64
source · pub enum UnwindRuleX86_64 {
EndOfStack,
JustReturn,
JustReturnIfFirstFrameOtherwiseFp,
OffsetSp {
sp_offset_by_8: u16,
},
OffsetSpAndRestoreBp {
sp_offset_by_8: u16,
bp_storage_offset_from_sp_by_8: i16,
},
UseFramePointer,
OffsetSpAndPopRegisters {
sp_offset_by_8: u16,
register_count: u8,
encoded_registers_to_pop: u16,
},
}
Expand description
For all of these: return address is *(new_sp - 8)
Variants§
EndOfStack
JustReturn
(sp, bp) = (sp + 8, bp)
JustReturnIfFirstFrameOtherwiseFp
(sp, bp) = if is_first_frame (sp + 8, bp) else (bp + 16, *bp)
OffsetSp
(sp, bp) = (sp + 8x, bp)
OffsetSpAndRestoreBp
(sp, bp) = (sp + 8x, *(sp + 8y))
UseFramePointer
(sp, bp) = (bp + 16, *bp)
OffsetSpAndPopRegisters
Fields
(sp, …) = (sp + 8 * (offset + register count), … popped according to encoded ordering) This supports the common case of pushed callee-saved registers followed by a stack allocation. Up to 8 registers can be stored, which covers all callee-saved registers (aside from RSP which is implicit).
The registers are stored in a separate compressed ordering to facilitate restoring register values if desired. If not for this we could simply store the total offset.
Implementations§
source§impl UnwindRuleX86_64
impl UnwindRuleX86_64
sourcepub fn for_sequence_of_offset_or_pop<I, T>(iter: I) -> Option<Self>
pub fn for_sequence_of_offset_or_pop<I, T>(iter: I) -> Option<Self>
Get the rule which represents the given operations, if possible.
Trait Implementations§
source§impl Clone for UnwindRuleX86_64
impl Clone for UnwindRuleX86_64
source§fn clone(&self) -> UnwindRuleX86_64
fn clone(&self) -> UnwindRuleX86_64
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for UnwindRuleX86_64
impl Debug for UnwindRuleX86_64
source§impl PartialEq for UnwindRuleX86_64
impl PartialEq for UnwindRuleX86_64
source§fn eq(&self, other: &UnwindRuleX86_64) -> bool
fn eq(&self, other: &UnwindRuleX86_64) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for UnwindRuleX86_64
impl Eq for UnwindRuleX86_64
impl StructuralEq for UnwindRuleX86_64
impl StructuralPartialEq for UnwindRuleX86_64
Auto Trait Implementations§
impl RefUnwindSafe for UnwindRuleX86_64
impl Send for UnwindRuleX86_64
impl Sync for UnwindRuleX86_64
impl Unpin for UnwindRuleX86_64
impl UnwindSafe for UnwindRuleX86_64
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