|
I found that disassemble doesn't work properly for me using the host Linux 64 bit platform. The problem is that function or32_extract() returns a signed-extended mask, which doesn't match the opcode of the instruction (in or32_opcode_match), which remains non-extended.
IMO, the fix is to prevent sign extension by using '1L' rather than '1' in the following way: diff -u gdb-5.3-old/opcodes/or32-dis.c gdb-5.3/opcodes/or32-dis.c
--- gdb-5.3-old/opcodes/or32-dis.c 2007-01-23 13:29:26.000000000 +0200
+++ gdb-5.3/opcodes/or32-dis.c 2007-01-23 13:23:21.000000000 +0200
@@ -99,7 +99,7 @@
else if ((*enc == '0') || (*enc == '1')) {
opc_pos--;
if (param_ch == *enc)
- ret |= 1 << opc_pos;
- ret |= 1L << opc_pos;
enc++;
}
else if (*enc == param_ch) {
...Regards,
Vitaly
|