* cgen-ibld.in (extract_normal): Avoid memory range errors.
authorDJ Delorie <dj@redhat.com>
Tue, 3 Jan 2006 22:06:18 +0000 (22:06 +0000)
committerDJ Delorie <dj@redhat.com>
Tue, 3 Jan 2006 22:06:18 +0000 (22:06 +0000)
* m32c-ibld.c: Regenerated.

opcodes/ChangeLog
opcodes/cgen-ibld.in
opcodes/m32c-ibld.c

index e465c8d0381e0691aefa3b4b69d9e64e633020da..ba9d16d3185adfa2954f5c4f51729d57fc3cc59c 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-03  DJ Delorie  <dj@redhat.com>
+
+       * cgen-ibld.in (extract_normal): Avoid memory range errors.
+       * m32c-ibld.c: Regenerated.
+
 2005-12-27  Alan Modra  <amodra@bigpond.net.au>
 
        * Makefile.am: Run "make dep-am".
index 75506cdfc7aeaae14aac7f0d1f3e87bec09fe803..77deeed55d210b14c7b47264e012647b16ebee2c 100644 (file)
@@ -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?  */
index 16f0048e3b08718edeb6b5246d096491fd06e49c..62c753b93452651f667a9d93b69f123611ed3b58 100644 (file)
@@ -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?  */
This page took 0.028955 seconds and 4 git commands to generate.