rust-x86asm
rust-x86asm copied to clipboard
Fix using R8-15 in addressing
REX registers were previously not allowed in memory addressing operands (i.e., Operand::Indirect*).
To be honest, I'm not too experienced in x86 opcode encoding and I'm not to sure if this is the correct way to fix this, but it "works for me" (for now).
For example, I'm not sure if this change should be extended to encode_indirect_32
using Reg::R8D
etc., as it seems to be used as a fallback when encode_indirect_64
fails.
Feel free to comment on my concerns and make suggestions for further modifications.