aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorJohn Healy <jhealy@redhat.com>2001-10-12 18:28:57 +0000
committerJohn Healy <jhealy@redhat.com>2001-10-12 18:28:57 +0000
commit6e9a3f4d034f998ffbf6128aae3a26d6745832a5 (patch)
tree455cd80ef5b322f5fd0300f4a0c4e481d1698b7a /opcodes
parent55159471487c64f3b5c9f10db45d24421725e2c8 (diff)
downloadbinutils-6e9a3f4d034f998ffbf6128aae3a26d6745832a5.zip
binutils-6e9a3f4d034f998ffbf6128aae3a26d6745832a5.tar.gz
binutils-6e9a3f4d034f998ffbf6128aae3a26d6745832a5.tar.bz2
2001-10-12 John Healy <jhealy@redhat.com>
* cgen-dis.in (print_insn): Use min (cd->base_insn_bitsize, buflen*8) for the length when extracting the base part of the insn.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/cgen-dis.in6
2 files changed, 10 insertions, 1 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index b0ef719..e241f60 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-12 John Healy <jhealy@redhat.com>
+
+ * cgen-dis.in (print_insn): Use min (cd->base_insn_bitsize, buflen*8)
+ for the length when extracting the base part of the insn.
+
2001-10-09 Bruno Haible <haible@clisp.cons.org>
* cgen-asm.in (*_cgen_build_insn_regex): Generate a case sensitive
diff --git a/opcodes/cgen-dis.in b/opcodes/cgen-dis.in
index 7065644..f2c9dd5 100644
--- a/opcodes/cgen-dis.in
+++ b/opcodes/cgen-dis.in
@@ -218,9 +218,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