This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] s390 .insp pseudo op fix.


Hi,
I added a bug fix for the s390 assembler. If the assembler is compiled
for 31 bit without --enable-64-bit-bfd the range checks in s390_insn
are broken.

blue skies,
  Martin.

2004-06-15  Martin Schwidefsky  <schwidefsky@de.ibm.com>

	* config/tc-s390.c (s390_insn): Avoid incorrect signed/unsigned
	comparison 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-05-10 16:05:03.000000000 +0200
+++ src-s390/gas/config/tc-s390.c	2004-06-14 14:02:17.000000000 +0200
@@ -1596,13 +1596,13 @@
   if (exp.X_op == O_constant)
     {
       if (   (   opformat->oplen == 6
-	      && exp.X_add_number >= 0
+	      && (addressT) 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 >= 0
 	      && (addressT) exp.X_add_number < (1ULL << 32))
 	  || (   opformat->oplen == 2
-	      && exp.X_add_number >= 0
+	      && (addressT) exp.X_add_number >= 0
 	      && (addressT) exp.X_add_number < (1ULL << 16)))
 	md_number_to_chars (insn, exp.X_add_number, opformat->oplen);
       else


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]