diff options
author | Alan Modra <amodra@gmail.com> | 2007-03-08 11:14:20 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2007-03-08 11:14:20 +0000 |
commit | 1620f33de1ac5f1ee4abf14b87c49e45b5bf097f (patch) | |
tree | 83a550771a949a00994e32459337afe5aafcf10c /opcodes/mt-ibld.c | |
parent | 6f12865c0ea3dce3f28d8fa386b981e4610ac4d4 (diff) | |
download | gdb-1620f33de1ac5f1ee4abf14b87c49e45b5bf097f.zip gdb-1620f33de1ac5f1ee4abf14b87c49e45b5bf097f.tar.gz gdb-1620f33de1ac5f1ee4abf14b87c49e45b5bf097f.tar.bz2 |
Regenerate.
Diffstat (limited to 'opcodes/mt-ibld.c')
-rw-r--r-- | opcodes/mt-ibld.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/opcodes/mt-ibld.c b/opcodes/mt-ibld.c index 6778ac4..d1022a9 100644 --- a/opcodes/mt-ibld.c +++ b/opcodes/mt-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 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. @@ -168,13 +168,21 @@ insert_normal (CGEN_CPU_DESC cd, else if (! CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)) { unsigned long maxval = mask; - - if ((unsigned long) value > maxval) + unsigned long val = (unsigned long) value; + + /* For hosts with a word size > 32 check to see if value has been sign + extended beyond 32 bits. If so then ignore these higher sign bits + as the user is attempting to store a 32-bit signed value into an + unsigned 32-bit field which is allowed. */ + if (sizeof (unsigned long) > 4 && ((value >> 32) == -1)) + val &= 0xFFFFFFFF; + + if (val > maxval) { /* xgettext:c-format */ sprintf (errbuf, - _("operand out of range (%lu not between 0 and %lu)"), - value, maxval); + _("operand out of range (0x%lx not between 0 and 0x%lx)"), + val, maxval); return errbuf; } } @@ -440,9 +448,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? */ |