disasm: Fix for disassembly of BOUND
commitdb6ecf9b76a25c465887946fe70e74b3dcdce234
authorMark Scott <nasm@mscott.cx>
Tue, 3 Nov 2015 20:09:05 +0000 (3 23:09 +0300)
committerCyrill Gorcunov <gorcunov@gmail.com>
Tue, 3 Nov 2015 20:09:05 +0000 (3 23:09 +0300)
tree71673385fe64c9319158c001af4414c1fa269238
parentbe8a5c8f2dbde47719796209a796cd7ccea32e54
disasm: Fix for disassembly of BOUND

The opcode for BOUND, 62h, has a different meaning in long mode - it is the
prefix for EVEX instructions. ndisasm did not take this into account and always
tried to disassemble 62h back to an EVEX instruction.

Attached patch only permits EVEX disassembly if bitness is 64.
In 16/32 bit mode 62h will be not be a prefix and so disassemble
to BOUND.

Signed-off-by: Mark Scott <nasm@mscott.cx>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
disasm.c