diff options
author | Diego Novillo <dnovillo@google.com> | 1999-10-07 06:17:04 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@google.com> | 1999-10-07 06:17:04 +0000 |
commit | c43185deeb3397b3c6bd887060caae10e36da38c (patch) | |
tree | 7e8c6e434e47bd1bab31e1d6b04bef2c95a80818 /gas/config | |
parent | 07147777d3c2d251e3395f52f5236393c15a3d2e (diff) | |
download | gdb-c43185deeb3397b3c6bd887060caae10e36da38c.zip gdb-c43185deeb3397b3c6bd887060caae10e36da38c.tar.gz gdb-c43185deeb3397b3c6bd887060caae10e36da38c.tar.bz2 |
Added seven new instructions ld, ld2w, sac, sachi, slae, st and
st2w for d10v. Created new testsuite for d10v to verify new
instructions.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-d10v.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gas/config/tc-d10v.c b/gas/config/tc-d10v.c index 33926fb..7161a6b 100644 --- a/gas/config/tc-d10v.c +++ b/gas/config/tc-d10v.c @@ -196,10 +196,19 @@ check_range (num, bits, flags) if (flags & OPERAND_SIGNED) { - max = (1 << (bits - 1))-1; - min = - (1 << (bits - 1)); - if (((long)num > max) || ((long)num < min)) - retval = 1; + /* Signed 3-bit integers are restricted to the (-2, 3) range */ + if (flags & RESTRICTED_NUM3) + { + if ((long) num < -2 || (long) num > 3) + retval = 1; + } + else + { + max = (1 << (bits - 1)) - 1; + min = - (1 << (bits - 1)); + if (((long) num > max) || ((long) num < min)) + retval = 1; + } } else { |