aboutsummaryrefslogtreecommitdiff
path: root/opcodes/openrisc-dis.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-10-30 15:20:14 +0000
committerNick Clifton <nickc@redhat.com>2001-10-30 15:20:14 +0000
commit3c3bdf30e42268e6193693acd1dc66d2d1792536 (patch)
tree8f6b2752d885c3e71d0bef5717e981faac396928 /opcodes/openrisc-dis.c
parentf5ffc9190a633d0f8eb1632a64a28eda75206b55 (diff)
downloadgdb-3c3bdf30e42268e6193693acd1dc66d2d1792536.zip
gdb-3c3bdf30e42268e6193693acd1dc66d2d1792536.tar.gz
gdb-3c3bdf30e42268e6193693acd1dc66d2d1792536.tar.bz2
Add MMIX support
Diffstat (limited to 'opcodes/openrisc-dis.c')
-rw-r--r--opcodes/openrisc-dis.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/opcodes/openrisc-dis.c b/opcodes/openrisc-dis.c
index 6bbb0cb..d4f7537 100644
--- a/opcodes/openrisc-dis.c
+++ b/opcodes/openrisc-dis.c
@@ -318,9 +318,13 @@ print_insn (cd, pc, info, buf, buflen)
CGEN_INSN_INT insn_value;
const CGEN_INSN_LIST *insn_list;
CGEN_EXTRACT_INFO ex_info;
+ int basesize;
/* Extract base part of instruction, just in case CGEN_DIS_* uses it. */
- insn_value = cgen_get_insn_value (cd, buf, buflen * 8);
+ basesize = cd->base_insn_bitsize < buflen * 8 ?
+ cd->base_insn_bitsize : buflen * 8;
+ insn_value = cgen_get_insn_value (cd, buf, basesize);
+
/* Fill in ex_info fields like read_insn would. Don't actually call
read_insn, since the incoming buffer is already read (and possibly