[PATCH] s390* .insn pseudo op fix.
Martin Schwidefsky
schwidefsky@de.ibm.com
Fri Feb 27 12:36:00 GMT 2004
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"));
More information about the Binutils
mailing list