aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2004-02-27 12:33:11 +0000
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2004-02-27 12:33:11 +0000
commit1d6d62a4827d7b67fb6fe8ee62377a3544c67d88 (patch)
treeb8a0ed25dd599c767ff22f1f720efc6ad85d6df2 /gas
parent4aa3e325e038349730ecd5d41848b98a1cdcdf4b (diff)
downloadgdb-1d6d62a4827d7b67fb6fe8ee62377a3544c67d88.zip
gdb-1d6d62a4827d7b67fb6fe8ee62377a3544c67d88.tar.gz
gdb-1d6d62a4827d7b67fb6fe8ee62377a3544c67d88.tar.bz2
* config/tc-s390.c (s390_insn): Correct range check for opcode in
.insn pseudo operation.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-s390.c12
2 files changed, 14 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 1064635..b8b3d5e 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-27 Hannes Reinecke <hare@suse.de>
+
+ * config/tc-s390.c (s390_insn): Correct range check for opcode in
+ .insn pseudo operation.
+
2004-02-27 Anil Paranjpe <anilp1@kpitcummins.com>
* config/tc-sh.c (get_operand): In case of #Imm, check has been
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c
index ef51bca..c450eae 100644
--- a/gas/config/tc-s390.c
+++ b/gas/config/tc-s390.c
@@ -1614,9 +1614,15 @@ s390_insn (ignore)
expression (&exp);
if (exp.X_op == O_constant)
{
- if ( (opformat->oplen == 6 && exp.X_op > 0 && exp.X_op < (1ULL << 48))
- || (opformat->oplen == 4 && exp.X_op > 0 && exp.X_op < (1ULL << 32))
- || (opformat->oplen == 2 && exp.X_op > 0 && exp.X_op < (1ULL << 16)))
+ if ( ( opformat->oplen == 6
+ && exp.X_add_number >= 0
+ && (addressT) exp.X_add_number < (1ULL << 48))
+ || ( opformat->oplen == 4
+ && exp.X_add_number >= 0
+ && (addressT) exp.X_add_number < (1ULL << 32))
+ || ( opformat->oplen == 2
+ && exp.X_add_number >= 0
+ && (addressT) exp.X_add_number < (1ULL << 16)))
md_number_to_chars (insn, exp.X_add_number, opformat->oplen);
else
as_bad (_("Invalid .insn format\n"));