- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How CPU differentiates between the following instructions while it is in IA-32e, 64 bit, long mode :
PUSH r/m16
PUSH r/m64
While the opcode for both is FF/6, they have the same code segment descriptor, no prefixes were used and the default operand size attribute is 8 or 32 bits?!!
PUSH r/m16
PUSH r/m64
While the opcode for both is FF/6, they have the same code segment descriptor, no prefixes were used and the default operand size attribute is 8 or 32 bits?!!
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you have only two flavors 16 bit and 64 bit, 66 prefix is what seperates them
from the manual:
from the manual:
In 64-bit mode, the instructions default operation size is 64 bits. In a push, the
64-bit RSP register (stack pointer) is decremented by 8. A 66H override causes
16-bit operation. Note that pushing a 16-bit operand can result in the stack pointer
misaligned to 8-byte boundary.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you to answer the question
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