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.
The MODRM byte, 0x0b, is mod == 0, reg == 1, rm == 3. "test" is reg == 0. reg == 1 is undefined.