Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

PUSH instruction in 64 bit mode

logicman112
Beginner
1,829 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
1,829 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.

0 Kudos
logicman112
Beginner
1,829 Views
thank you to answer the question
0 Kudos
Reply