rust-x86asm icon indicating copy to clipboard operation
rust-x86asm copied to clipboard

Fix using R8-15 in addressing

Open ftilde opened this issue 6 years ago • 0 comments

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.

ftilde avatar Oct 27 '18 11:10 ftilde