Bug 20709 - [libopcodes][x86]Failure to disassemble variant encoding of test instruction
Summary: [libopcodes][x86]Failure to disassemble variant encoding of test instruction
Status: RESOLVED INVALID
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.26
: P2 normal
Target Milestone: 2.26
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-17 19:50 UTC by nholcomb
Modified: 2016-10-18 15:45 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nholcomb 2016-10-17 19:50:28 UTC
The following are the bytes of a test instruction and the expected output. Libopcodes returns a "(bad)" instruction when disassembling these bytes.

Bytes: f6 0b 50
Expected output: test $0x50,(%rbx)

The other possible encoding of this instruction is f6 03 50.
Comment 1 H.J. Lu 2016-10-18 15:45:39 UTC
The MODRM byte, 0x0b, is mod == 0, reg == 1, rm == 3.
"test" is reg == 0.  reg == 1 is undefined.