This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] s390* .insn pseudo op fix.
- From: Martin Schwidefsky <schwidefsky at de dot ibm dot com>
- To: binutils at sources dot redhat dot com
- Date: Fri, 27 Feb 2004 13:36:34 +0100
- Subject: [PATCH] s390* .insn pseudo op fix.
Hi,
another fix for s390*. The range check for the opcode in the .insn pseudo
operation is wrong. It checks against exp.X_op instead of exp.X_add_number.
blue skies,
Martin.
2004-02-27 Hannes Reinecke <hare@suse.de>
* config/tc-s390.c (s390_insn): Correct range check for opcode in
.insn pseudo operation.
diff -urN src/gas/config/tc-s390.c src-s390/gas/config/tc-s390.c
--- src/gas/config/tc-s390.c 2004-02-27 11:13:31.000000000 +0100
+++ src-s390/gas/config/tc-s390.c 2004-02-27 11:12:00.000000000 +0100
@@ -1614,9 +1614,15 @@
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"));