- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel software developer's manual, 3A, System Programming Guide:
------------------------------------------------------------------------------------------------
6.14.2 64-Bit Mode Stack Frame
In IA-32e mode, the RSP is aligned to a 16-byte boundary before pushing the stack
frame. The stack frame itself is aligned on a 16-byte boundary when the interrupt
handler is called. The processor can arbitrarily realign the new RSP on interrupts
because the previous (possibly unaligned) RSP is unconditionally saved on the newly
aligned stack. The previous RSP will be automatically restored by a subsequent IRET.
------------------------------------------------------------------------------------------------
In IA-32e we have compatibility mode, while if CPL does not change, SS and RSP will not be saved in the stack. So how IRET will restore the previous content of RSP?
The sentence fails for (compatibility mode, CPL does not change, RSP is not aligned to 16 byte boundary before interrupt)
------------------------------------------------------------------------------------------------
6.14.2 64-Bit Mode Stack Frame
In IA-32e mode, the RSP is aligned to a 16-byte boundary before pushing the stack
frame. The stack frame itself is aligned on a 16-byte boundary when the interrupt
handler is called. The processor can arbitrarily realign the new RSP on interrupts
because the previous (possibly unaligned) RSP is unconditionally saved on the newly
aligned stack. The previous RSP will be automatically restored by a subsequent IRET.
------------------------------------------------------------------------------------------------
In IA-32e we have compatibility mode, while if CPL does not change, SS and RSP will not be saved in the stack. So how IRET will restore the previous content of RSP?
The sentence fails for (compatibility mode, CPL does not change, RSP is not aligned to 16 byte boundary before interrupt)
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page