Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

PUSH instruction in 64 bit mode

logicman112
Beginner
479 Views
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
479 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
479 Views
thank you to answer the question
Reply