4

About push wordregister(r16) under 64BIT mode of Intel x86_64 CPU.

In B-28, Vol. 2D, APPENDIX B, INSTRUCTION FORMATS AND ENCODINGS, Intel Combined Manual PDF, Order Number: 325462-080US, June 2023.

Table B-15. General Purpose Instruction Formats and Encodings for 64-Bit Mode (Contd.) enter image description here

I think the correct one is 0110_0110 (0x66). But it is 0101_0101 (0x55). 0x66 is an operand-size prefix that changes operand-size to 16 bits where cpu is in 64-bit mode. But I don't know 0x55 prefix.

Additionally, there is no push imm64 instruction, according to How to push a 64bit int in NASM?.

enter image description here

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
YutakaAoki
  • 87
  • 5
  • 2
    Right, the encoding for `push ax` in 64-bit mode is `66h 50h`. `55h` is the opcode for `push rbp`. Intel's manuals are notoriously imperfect, you might want to report these defects to Intel (probably on their forums) for them to update. – Peter Cordes Jul 29 '23 at 11:00

0 Answers0