Community
cancel
Showing results for 
Search instead for 
Did you mean: 
logicman112
Beginner
263 Views

PUSH instruction in 64 bit mode

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?!!
0 Kudos
2 Replies
neni
New Contributor II
263 Views

you have only two flavors 16 bit and 64 bit, 66 prefix is what seperates them

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.

logicman112
Beginner
263 Views

thank you to answer the question
Reply