You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For reason not yet understood, a move operations with R12 as indirect source results in a 4 byte instruction.
Switch the register mapping to avoid R12.
The text was updated successfully, but these errors were encountered:
Alan-Jowett
changed the title
Register R1 requires special encoding in modrm bytes - Avoid using it to simplify x64 code gen
Register R12 requires special encoding in modrm bytes - Avoid using it to simplify x64 code gen
Jun 1, 2021
More background on this:
R12 and RSP use the same register encoding (excluding the bit in REX).
R13 and RBP use the same register encoding (excluding the bit in REX).
emit_modrm_and_displacement correctly handles encoding R13 as an EBP relative addressing, but doesn't do RSP relative addressing correctly. This results in malformed instruction.
Register R12 requires special encoding in modrm byte - Avoid using it to simplify x64 code gen.
0: 45 8b 3b mov r15d,DWORD PTR [r11]
0: 45 8b 3c 24 mov r15d,DWORD PTR [r12]
For reason not yet understood, a move operations with R12 as indirect source results in a 4 byte instruction.
Switch the register mapping to avoid R12.
The text was updated successfully, but these errors were encountered: