aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1997-09-08 19:32:05 +0000
committerNick Clifton <nickc@redhat.com>1997-09-08 19:32:05 +0000
commit1fd5f4fc624288d5ae6c98908f58102588a031a3 (patch)
tree4753fd46dab5faf0b7642bebaf740fe5cfe48c51 /gas/config
parent5d37a07bc55b67b4ef41ca66f31a36699ab7b783 (diff)
downloadgdb-1fd5f4fc624288d5ae6c98908f58102588a031a3.zip
gdb-1fd5f4fc624288d5ae6c98908f58102588a031a3.tar.gz
gdb-1fd5f4fc624288d5ae6c98908f58102588a031a3.tar.bz2
Added -mwarn_unsigned_overflow so that defuault is to treat unsigned
values as signed values if they start to overflow.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-v850.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c
index 6d708c5..6bf5c2c 100644
--- a/gas/config/tc-v850.c
+++ b/gas/config/tc-v850.c
@@ -32,6 +32,7 @@ static bfd_reloc_code_real_type hold_cons_reloc;
/* Set to TRUE if we want to be pedantic about signed overflows. */
static boolean warn_signed_overflows = FALSE;
+static boolean warn_unsigned_overflows = FALSE;
/* Structure to hold information about predefined registers. */
@@ -776,6 +777,12 @@ md_parse_option (c, arg)
return 1;
}
+ if (c == 'w' && strcmp (arg, "unsigned_overflow") == 0)
+ {
+ warn_unsigned_overflows = TRUE;
+ return 1;
+ }
+
return 0;
}
@@ -1646,7 +1653,11 @@ v850_insert_operand (insn, operand, val, file, line)
else
{
max = (1 << operand->bits) - 1;
- min = 0;
+
+ if (! warn_unsigned_overflows)
+ min = - (1 << (operand->bits - 1));
+ else
+ min = 0;
}
test = val;