Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There are also no RAH, RBH, .... You can only access AH by using the old 32-bit encoding.

This happens because in 32-bit x86, you only have access to AL, AH, BL, BH, CL, CH, DL, DH (no lower bytes of EDI, ESP, etc). These are 8 different possibilities, that are encoded by ModR/M's 3 Reg bits.

In amd64, they decided to regularize the instruction set: those 3 bits are now used to encode the lower byte of EAX--EDI (AL, CL, ..., DIL). To get R8L, ..., R15L you use the REX.R prefix, which acts as the 4th bit.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: