diff options
author | DJ Delorie <dj@delorie.com> | 2006-01-03 22:06:18 +0000 |
---|---|---|
committer | DJ Delorie <dj@delorie.com> | 2006-01-03 22:06:18 +0000 |
commit | d768abc8e4b4d850f64509c306a0db958e051f40 (patch) | |
tree | 75eb5dee112795fcc71081da8ad22428a1fcbda7 /opcodes/cgen-ibld.in | |
parent | 73c20bc9e70e9e460c022bd1fc0fff32a24634f5 (diff) | |
download | binutils-redhat-d768abc8e4b4d850f64509c306a0db958e051f40.tar.gz |
* cgen-ibld.in (extract_normal): Avoid memory range errors.
* m32c-ibld.c: Regenerated.
Diffstat (limited to 'opcodes/cgen-ibld.in')
-rw-r--r-- | opcodes/cgen-ibld.in | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/opcodes/cgen-ibld.in b/opcodes/cgen-ibld.in index 75506cdfc7..77deeed55d 100644 --- a/opcodes/cgen-ibld.in +++ b/opcodes/cgen-ibld.in @@ -3,7 +3,7 @@ THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator. - the resultant file is machine generated, cgen-ibld.in isn't - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005 + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU Binutils and GDB, the GNU debugger. @@ -440,9 +440,8 @@ extract_normal (CGEN_CPU_DESC cd, word_length may be too big. */ if (cd->min_insn_bitsize < cd->base_insn_bitsize) { - if (word_offset == 0 - && word_length > total_length) - word_length = total_length; + if (word_offset + word_length > total_length) + word_length = total_length - word_offset; } /* Does the value reside in INSN_VALUE, and at the right alignment? */ |