This is the mail archive of the binutils@sourceware.org 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]

Fix argument mismatch in MIPS assembler


On a 32-bit big-endian host you'll get a testsuite failure for the mips
assembler due to mismatching arguments passed to a varargs function.
Tested on powerpc-linux and checked in as obvious.

Andreas.

2009-01-23  Andreas Schwab  <schwab@suse.de>

	* config/tc-mips.c (macro) [M_DINS, M_SEQ_I, M_SNE_I]: Cast
	arguments to macro_build to match format.

--- config/tc-mips.c.~1.400.~	2009-01-07 09:44:52.000000000 +0100
+++ config/tc-mips.c	2009-01-23 14:58:11.000000000 +0100
@@ -5241,8 +5241,8 @@ macro (struct mips_cl_insn *ip)
 	    s = "dinsm";
 	    fmt = "t,r,+A,+F";
 	  }
-	macro_build ((expressionS *) NULL, s, fmt, treg, sreg, pos,
-		     pos + size - 1);
+	macro_build ((expressionS *) NULL, s, fmt, treg, sreg, (int) pos,
+		     (int) (pos + size - 1));
       }
       break;
 
@@ -7637,7 +7637,7 @@ macro2 (struct mips_cl_insn *ip)
 	  && imm_expr.X_add_number < 512)
 	{
 	  macro_build (NULL, "seqi", "t,r,+Q", dreg, sreg,
-		       imm_expr.X_add_number);
+		       (int) imm_expr.X_add_number);
 	  break;
 	}
       if (imm_expr.X_op == O_constant
@@ -7799,7 +7799,7 @@ macro2 (struct mips_cl_insn *ip)
 	  && imm_expr.X_add_number < 512)
 	{
 	  macro_build (NULL, "snei", "t,r,+Q", dreg, sreg,
-		       imm_expr.X_add_number);
+		       (int) imm_expr.X_add_number);
 	  break;
 	}
       if (imm_expr.X_op == O_constant

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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