diff options
author | Andrew Haley <aph@redhat.com> | 2000-02-24 16:19:36 +0000 |
---|---|---|
committer | Andrew Haley <aph@redhat.com> | 2000-02-24 16:19:36 +0000 |
commit | cfcdbe979065f75a9cefa1925253a4e29c5b6fb1 (patch) | |
tree | 8c54bd15a54b6455ac65ce52be126f6b4789e96f /opcodes/m32r-ibld.c | |
parent | 36bf8ab9fb86c4e3c5b5742ad32c3f0d6bd362aa (diff) | |
download | gdb-cfcdbe979065f75a9cefa1925253a4e29c5b6fb1.zip gdb-cfcdbe979065f75a9cefa1925253a4e29c5b6fb1.tar.gz gdb-cfcdbe979065f75a9cefa1925253a4e29c5b6fb1.tar.bz2 |
2000-02-23 Andrew Haley <aph@cygnus.com>
* m32r-asm.c, m32r-desc.c, m32r-desc.h, m32r-dis.c,
m32r-ibld.c,m32r-opc.h: Rebuild.
Diffstat (limited to 'opcodes/m32r-ibld.c')
-rw-r--r-- | opcodes/m32r-ibld.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/opcodes/m32r-ibld.c b/opcodes/m32r-ibld.c index 48dc73f..30c3c6a 100644 --- a/opcodes/m32r-ibld.c +++ b/opcodes/m32r-ibld.c @@ -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 (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU Binutils and GDB, the GNU debugger. @@ -203,6 +203,7 @@ insert_normal (cd, value, attrs, word_offset, start, length, word_length, if (! CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)) { unsigned long maxval = mask; + if ((unsigned long) value > maxval) { /* xgettext:c-format */ @@ -214,15 +215,19 @@ insert_normal (cd, value, attrs, word_offset, start, length, word_length, } else { - long minval = - (1L << (length - 1)); - long maxval = (1L << (length - 1)) - 1; - if (value < minval || value > maxval) + if (! cgen_signed_overflow_ok_p (cd)) { - sprintf - /* xgettext:c-format */ - (errbuf, _("operand out of range (%ld not between %ld and %ld)"), - value, minval, maxval); - return errbuf; + long minval = - (1L << (length - 1)); + long maxval = (1L << (length - 1)) - 1; + + if (value < minval || value > maxval) + { + sprintf + /* xgettext:c-format */ + (errbuf, _("operand out of range (%ld not between %ld and %ld)"), + value, minval, maxval); + return errbuf; + } } } |