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
(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 duplicate 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
impl Copy for UnwindRuleX86_64
impl Eq for UnwindRuleX86_64
impl StructuralPartialEq for UnwindRuleX86_64
Auto Trait Implementations§
impl Freeze for UnwindRuleX86_64
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