GregoryComer / rust-x86asm

A Rust library for x86/64 assembly/disassembly.
MIT License
51 stars 11 forks source link

Fix encoding of instructions with add_opcode and REX registers #6

Open ftilde opened 5 years ago

ftilde commented 5 years ago

This fixes encoding of 'POP R8', 'PUSH R15', etc.

Previously, no "rex byte" was generated when using REX registers with instructions that use opcode_add and the register code (>= 0x8) overflowed into the primary opcode, thus changing the instruction in itself.