diff options
author | Martin Hunt <hunt@redhat.com> | 1996-07-31 22:00:36 +0000 |
---|---|---|
committer | Martin Hunt <hunt@redhat.com> | 1996-07-31 22:00:36 +0000 |
commit | 9971ae5941d67c7e51df1f5b2b9db0f003146a7e (patch) | |
tree | 2495688652441fcd0418ddf7266d7389b3729fdb /gas/config | |
parent | b5cf67793213c1932144791c6406069972a67bfd (diff) | |
download | gdb-9971ae5941d67c7e51df1f5b2b9db0f003146a7e.zip gdb-9971ae5941d67c7e51df1f5b2b9db0f003146a7e.tar.gz gdb-9971ae5941d67c7e51df1f5b2b9db0f003146a7e.tar.bz2 |
Wed Jul 31 14:46:11 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* tc-d10v.c: Disable range checking on 16-bit values.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-d10v.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/gas/config/tc-d10v.c b/gas/config/tc-d10v.c index c8ee06c..1b0480b 100644 --- a/gas/config/tc-d10v.c +++ b/gas/config/tc-d10v.c @@ -155,6 +155,10 @@ check_range (num, bits, flags) long min, max, bit1; int retval=0; + /* don't bother checking 16-bit values */ + if (bits == 16) + return 0; + if (flags & OPERAND_SHIFT) { /* all special shift operands are unsigned */ @@ -167,14 +171,7 @@ check_range (num, bits, flags) if (flags & OPERAND_SIGNED) { - bit1 = (1 << (bits - 1)); - max = bit1 -1; - if (num & max) - { - /* sign-extend */ - num = ((num & (bit1 | max))^(~max))+bit1; - } - + max = (1 << (bits - 1))-1; min = - (1 << (bits - 1)); if (((long)num > max) || ((long)num < min)) retval = 1; @@ -186,7 +183,6 @@ check_range (num, bits, flags) if ((num > max) || (num < min)) retval = 1; } - return retval; } |