diff options
author | John Healy <jhealy@redhat.com> | 2001-10-12 18:28:57 +0000 |
---|---|---|
committer | John Healy <jhealy@redhat.com> | 2001-10-12 18:28:57 +0000 |
commit | e04dd3b2c4416acb819f7d632b49486e010a9562 (patch) | |
tree | 1cfc3cf21bd3c6b0739669e284f7d185c0bcfa76 /opcodes/cgen-dis.in | |
parent | 6c967cc06b14223f0e7800b75b4a6f1b8855c1a9 (diff) | |
download | gdb-e04dd3b2c4416acb819f7d632b49486e010a9562.tar.gz |
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/cgen-dis.in')
-rw-r--r-- | opcodes/cgen-dis.in | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/opcodes/cgen-dis.in b/opcodes/cgen-dis.in index 7065644b3e0..f2c9dd54ce3 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 |