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]

[PATCH] Add varargs casts in MIPS gas


Hi All,

this adds casts to make varargs work correctly (if someone
actually uses these).

Tested for mips-elf, mips-ecoff, mips64el-elf, mips64-linux.


Thiemo


08-11-2001  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>

	/gas/ChangeLog
	* config/tc-mips.c (set_at): Add cast needed for varargs.
	(load_register): Likewise.
	(macro): Likewise. Some code reformatting.
	(macro2): Add casts needed for varargs.
	(mips16_macro): Likewise.


diff -BurpNX /bigdisk/src/binutils-exclude src-orig/gas/config/tc-mips.c src/gas/config/tc-mips.c
--- src-orig/gas/config/tc-mips.c	Wed Nov  7 16:07:00 2001
+++ src/gas/config/tc-mips.c	Thu Nov  8 03:40:48 2001
@@ -3154,7 +3192,7 @@ set_at (counter, reg, unsignedp)
   else
     {
       load_register (counter, AT, &imm_expr, 0);
-      macro_build ((char *) NULL, counter, NULL,
+      macro_build ((char *) NULL, counter, (expressionS *) NULL,
 		   unsignedp ? "sltu" : "slt",
 		   "d,v,t", AT, reg, AT);
     }
@@ -3402,7 +3451,7 @@ load_register (counter, reg, ep, dbl)
 	      macro_build ((char *) NULL, counter, &tmp,
 			   "ori", "t,r,i", reg, 0,
 			   (int) BFD_RELOC_LO16);
-	      macro_build ((char *) NULL, counter, NULL,
+	      macro_build ((char *) NULL, counter, (expressionS *) NULL,
 			   (shift >= 32) ? "dsll32" : "dsll",
 			   "d,w,<", reg, reg,
 			   (shift >= 32) ? shift - 32 : shift);
@@ -3457,12 +3506,12 @@ load_register (counter, reg, ep, dbl)
 	      if (bit != 0)
 		{
 		  bit += shift;
-		  macro_build ((char *) NULL, counter, NULL,
+		  macro_build ((char *) NULL, counter, (expressionS *) NULL,
 			       (bit >= 32) ? "dsll32" : "dsll",
 			       "d,w,<", reg, reg,
 			       (bit >= 32) ? bit - 32 : bit);
 		}
-	      macro_build ((char *) NULL, counter, NULL,
+	      macro_build ((char *) NULL, counter, (expressionS *) NULL,
 			   (shift >= 32) ? "dsrl32" : "dsrl",
 			   "d,w,<", reg, reg,
 			   (shift >= 32) ? shift - 32 : shift);
@@ -3481,8 +3530,8 @@ load_register (counter, reg, ep, dbl)
     {
       if (freg != 0)
 	{
-	  macro_build ((char *) NULL, counter, NULL, "dsll32", "d,w,<", reg,
-		       freg, 0);
+	  macro_build ((char *) NULL, counter, (expressionS *) NULL,
+		       "dsll32", "d,w,<", reg, freg, 0);
 	  freg = reg;
 	}
     }
@@ -3586,10 +3635,10 @@ load_address (counter, reg, ep, dbl, use
 			   reg, reg, (int) BFD_RELOC_MIPS_HIGHER);
 	      macro_build (p, counter, ep, "daddiu", "t,r,j",
 			   AT, AT, (int) BFD_RELOC_LO16);
-	      macro_build (p, counter, NULL, "dsll32", "d,w,<",
-			   reg, reg, 0);
-	      macro_build (p, counter, NULL, "dadd", "d,v,t",
-			   reg, reg, AT);
+	      macro_build (p, counter, (expressionS *) NULL, "dsll32",
+			   "d,w,<", reg, reg, 0);
+	      macro_build (p, counter, (expressionS *) NULL, "dadd",
+			   "d,v,t", reg, reg, AT);
 	      *used_at = 1;
 	    }
 	  else
@@ -3598,12 +3647,12 @@ load_address (counter, reg, ep, dbl, use
 			   reg, (int) BFD_RELOC_MIPS_HIGHEST);
 	      macro_build (p, counter, ep, "daddiu", "t,r,j",
 			   reg, reg, (int) BFD_RELOC_MIPS_HIGHER);
-	      macro_build (p, counter, NULL, "dsll", "d,w,<",
-			   reg, reg, 16);
+	      macro_build (p, counter, (expressionS *) NULL, "dsll",
+			   "d,w,<", reg, reg, 16);
 	      macro_build (p, counter, ep, "daddiu", "t,r,j",
 			   reg, reg, (int) BFD_RELOC_HI16_S);
-	      macro_build (p, counter, NULL, "dsll", "d,w,<",
-			   reg, reg, 16);
+	      macro_build (p, counter, (expressionS *) NULL, "dsll",
+			   "d,w,<", reg, reg, 16);
 	      macro_build (p, counter, ep, "daddiu", "t,r,j",
 			   reg, reg, (int) BFD_RELOC_LO16);
 	    }
@@ -3822,10 +3880,11 @@ macro (ip)
       expr1.X_add_number = 8;
       macro_build ((char *) NULL, &icnt, &expr1, "bgez", "s,p", sreg);
       if (dreg == sreg)
-	macro_build ((char *) NULL, &icnt, NULL, "nop", "", 0);
+	macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", "",
+		     0);
       else
 	move_register (&icnt, dreg, sreg);
-      macro_build ((char *) NULL, &icnt, NULL,
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
 		   dbl ? "dsub" : "sub", "d,v,t", dreg, 0, sreg);
 
       --mips_opts.noreorder;
@@ -3858,7 +3917,8 @@ macro (ip)
 	  return;
 	}
       load_register (&icnt, AT, &imm_expr, dbl);
-      macro_build ((char *) NULL, &icnt, NULL, s2, "d,v,t", treg, sreg, AT);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s2, "d,v,t",
+		   treg, sreg, AT);
       break;
 
     case M_AND_I:
@@ -3888,14 +3948,15 @@ macro (ip)
 	    {
 	      macro_build ((char *) NULL, &icnt, &imm_expr, "ori", "t,r,i",
 			   treg, sreg, (int) BFD_RELOC_LO16);
-	      macro_build ((char *) NULL, &icnt, NULL, "nor", "d,v,t",
-			   treg, treg, 0);
+	      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nor",
+			   "d,v,t", treg, treg, 0);
 	    }
 	  return;
 	}
 
       load_register (&icnt, AT, &imm_expr, HAVE_64BIT_GPRS);
-      macro_build ((char *) NULL, &icnt, NULL, s2, "d,v,t", treg, sreg, AT);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s2, "d,v,t",
+		   treg, sreg, AT);
       break;
 
     case M_BEQ_I:
@@ -3928,18 +3989,17 @@ macro (ip)
       if (treg == 0)
 	{
 	  macro_build ((char *) NULL, &icnt, &offset_expr,
-		       likely ? "bgezl" : "bgez",
-		       "s,p", sreg);
+		       likely ? "bgezl" : "bgez", "s,p", sreg);
 	  return;
 	}
       if (sreg == 0)
 	{
 	  macro_build ((char *) NULL, &icnt, &offset_expr,
-		       likely ? "blezl" : "blez",
-		       "s,p", treg);
+		       likely ? "blezl" : "blez", "s,p", treg);
 	  return;
 	}
-      macro_build ((char *) NULL, &icnt, NULL, "slt", "d,v,t", AT, sreg, treg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "slt", "d,v,t",
+		   AT, sreg, treg);
       macro_build ((char *) NULL, &icnt, &offset_expr,
 		   likely ? "beql" : "beq", "s,t,p", AT, 0);
       break;
@@ -3967,7 +4027,8 @@ macro (ip)
 	      if (warn_nops)
 		as_warn (_("Branch %s is always false (nop)"),
 			 ip->insn_mo->name);
-	      macro_build ((char *) NULL, &icnt, NULL, "nop", "", 0);
+	      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop",
+			   "", 0);
 	    }
 	  else
 	    {
@@ -4034,8 +4095,8 @@ macro (ip)
 		       likely ? "beql" : "beq", "s,t,p", 0, treg);
 	  return;
 	}
-      macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", AT, sreg,
-		   treg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu",
+		   "d,v,t", AT, sreg, treg);
       macro_build ((char *) NULL, &icnt, &offset_expr,
 		   likely ? "beql" : "beq", "s,t,p", AT, 0);
       break;
@@ -4084,7 +4145,8 @@ macro (ip)
 		       likely ? "bltzl" : "bltz", "s,p", treg);
 	  return;
 	}
-      macro_build ((char *) NULL, &icnt, NULL, "slt", "d,v,t", AT, treg, sreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "slt", "d,v,t",
+		   AT, treg, sreg);
       macro_build ((char *) NULL, &icnt, &offset_expr,
 		   likely ? "bnel" : "bne", "s,t,p", AT, 0);
       break;
@@ -4100,8 +4162,8 @@ macro (ip)
 	}
       if (sreg == 0)
 	goto do_false;
-      macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", AT, treg,
-		   sreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu",
+		   "d,v,t", AT, treg, sreg);
       macro_build ((char *) NULL, &icnt, &offset_expr,
 		   likely ? "bnel" : "bne", "s,t,p", AT, 0);
       break;
@@ -4121,7 +4183,8 @@ macro (ip)
 		       likely ? "bgezl" : "bgez", "s,p", treg);
 	  return;
 	}
-      macro_build ((char *) NULL, &icnt, NULL, "slt", "d,v,t", AT, treg, sreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "slt", "d,v,t",
+		   AT, treg, sreg);
       macro_build ((char *) NULL, &icnt, &offset_expr,
 		   likely ? "beql" : "beq", "s,t,p", AT, 0);
       break;
@@ -4177,8 +4240,8 @@ macro (ip)
 	}
       if (sreg == 0)
 	goto do_true;
-      macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", AT, treg,
-		   sreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu",
+		   "d,v,t", AT, treg, sreg);
       macro_build ((char *) NULL, &icnt, &offset_expr,
 		   likely ? "beql" : "beq", "s,t,p", AT, 0);
       break;
@@ -4228,7 +4291,8 @@ macro (ip)
 		       likely ? "bgtzl" : "bgtz", "s,p", treg);
 	  return;
 	}
-      macro_build ((char *) NULL, &icnt, NULL, "slt", "d,v,t", AT, sreg, treg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "slt", "d,v,t",
+		   AT, sreg, treg);
       macro_build ((char *) NULL, &icnt, &offset_expr,
 		   likely ? "bnel" : "bne", "s,t,p", AT, 0);
       break;
@@ -4244,7 +4308,8 @@ macro (ip)
 		       likely ? "bnel" : "bne", "s,t,p", 0, treg);
 	  return;
 	}
-      macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", AT, sreg,
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu",
+		   "d,v,t", AT, sreg,
 		   treg);
       macro_build ((char *) NULL, &icnt, &offset_expr,
 		   likely ? "bnel" : "bne", "s,t,p", AT, 0);
@@ -4264,9 +4329,11 @@ macro (ip)
 	{
 	  as_warn (_("Divide by zero."));
 	  if (mips_trap)
-	    macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", 0, 0);
+	    macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "teq",
+			 "s,t", 0, 0);
 	  else
-	    macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7);
+	    macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break",
+			 "c", 7);
 	  return;
 	}
 
@@ -4275,17 +4342,19 @@ macro (ip)
       mips_any_noreorder = 1;
       if (mips_trap)
 	{
-	  macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", treg, 0);
-	  macro_build ((char *) NULL, &icnt, NULL,
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "teq",
+		       "s,t", treg, 0);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
 		       dbl ? "ddiv" : "div", "z,s,t", sreg, treg);
 	}
       else
 	{
 	  expr1.X_add_number = 8;
 	  macro_build ((char *) NULL, &icnt, &expr1, "bne", "s,t,p", treg, 0);
-	  macro_build ((char *) NULL, &icnt, NULL,
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
 		       dbl ? "ddiv" : "div", "z,s,t", sreg, treg);
-	  macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break",
+		       "c", 7);
 	}
       expr1.X_add_number = -1;
       macro_build ((char *) NULL, &icnt, &expr1,
@@ -4298,8 +4367,8 @@ macro (ip)
 	  expr1.X_add_number = 1;
 	  macro_build ((char *) NULL, &icnt, &expr1, "daddiu", "t,r,j", AT, 0,
 		       (int) BFD_RELOC_LO16);
-	  macro_build ((char *) NULL, &icnt, NULL, "dsll32", "d,w,<", AT, AT,
-		       31);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "dsll32",
+		       "d,w,<", AT, AT, 31);
 	}
       else
 	{
@@ -4309,7 +4378,8 @@ macro (ip)
 	}
       if (mips_trap)
 	{
-	  macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", sreg, AT);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "teq",
+		       "s,t", sreg, AT);
 	  /* We want to close the noreorder block as soon as possible, so
 	     that later insns are available for delay slot filling.  */
 	  --mips_opts.noreorder;
@@ -4318,15 +4388,17 @@ macro (ip)
 	{
 	  expr1.X_add_number = 8;
 	  macro_build ((char *) NULL, &icnt, &expr1, "bne", "s,t,p", sreg, AT);
-	  macro_build ((char *) NULL, &icnt, NULL, "nop", "", 0);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", "",
+		       0);
 
 	  /* We want to close the noreorder block as soon as possible, so
 	     that later insns are available for delay slot filling.  */
 	  --mips_opts.noreorder;
 
-	  macro_build ((char *) NULL, &icnt, NULL, "break", "c", 6);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break",
+		       "c", 6);
 	}
-      macro_build ((char *) NULL, &icnt, NULL, s, "d", dreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "d", dreg);
       break;
 
     case M_DIV_3I:
@@ -4369,9 +4441,11 @@ macro (ip)
 	{
 	  as_warn (_("Divide by zero."));
 	  if (mips_trap)
-	    macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", 0, 0);
+	    macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "teq",
+			 "s,t", 0, 0);
 	  else
-	    macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7);
+	    macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break",
+			 "c", 7);
 	  return;
 	}
       if (imm_expr.X_op == O_constant && imm_expr.X_add_number == 1)
@@ -4388,8 +4462,8 @@ macro (ip)
 	{
 	  if (strcmp (s2, "mflo") == 0)
 	    {
-	      macro_build ((char *) NULL, &icnt, NULL, dbl ? "dneg" : "neg",
-			   "d,w", dreg, sreg);
+	      macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
+			   dbl ? "dneg" : "neg", "d,w", dreg, sreg);
 	    }
 	  else
 	    move_register (&icnt, dreg, 0);
@@ -4397,8 +4471,9 @@ macro (ip)
 	}
 
       load_register (&icnt, AT, &imm_expr, dbl);
-      macro_build ((char *) NULL, &icnt, NULL, s, "z,s,t", sreg, AT);
-      macro_build ((char *) NULL, &icnt, NULL, s2, "d", dreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "z,s,t",
+		   sreg, AT);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s2, "d", dreg);
       break;
 
     case M_DIVU_3:
@@ -4422,8 +4497,10 @@ macro (ip)
       mips_any_noreorder = 1;
       if (mips_trap)
 	{
-	  macro_build ((char *) NULL, &icnt, NULL, "teq", "s,t", treg, 0);
-	  macro_build ((char *) NULL, &icnt, NULL, s, "z,s,t", sreg, treg);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "teq",
+		       "s,t", treg, 0);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "z,s,t",
+		       sreg, treg);
 	  /* We want to close the noreorder block as soon as possible, so
 	     that later insns are available for delay slot filling.  */
 	  --mips_opts.noreorder;
@@ -4432,14 +4509,16 @@ macro (ip)
 	{
 	  expr1.X_add_number = 8;
 	  macro_build ((char *) NULL, &icnt, &expr1, "bne", "s,t,p", treg, 0);
-	  macro_build ((char *) NULL, &icnt, NULL, s, "z,s,t", sreg, treg);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "z,s,t",
+		       sreg, treg);
 
 	  /* We want to close the noreorder block as soon as possible, so
 	     that later insns are available for delay slot filling.  */
 	  --mips_opts.noreorder;
-	  macro_build ((char *) NULL, &icnt, NULL, "break", "c", 7);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break",
+		       "c", 7);
 	}
-      macro_build ((char *) NULL, &icnt, NULL, s2, "d", dreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s2, "d", dreg);
       return;
 
     case M_DLA_AB:
@@ -4555,9 +4639,9 @@ macro (ip)
 			     tempreg, tempreg, (int) BFD_RELOC_MIPS_HIGHER);
 		macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
 			     AT, AT, (int) BFD_RELOC_LO16);
-		macro_build (p, &icnt, NULL, "dsll32", "d,w,<",
-			     tempreg, tempreg, 0);
-		macro_build (p, &icnt, NULL, "dadd", "d,v,t",
+		macro_build (p, &icnt, (expressionS *) NULL, "dsll32",
+			     "d,w,<", tempreg, tempreg, 0);
+		macro_build (p, &icnt, (expressionS *) NULL, "dadd", "d,v,t",
 			     tempreg, tempreg, AT);
 		used_at = 1;
 	      }
@@ -4567,11 +4651,11 @@ macro (ip)
 			     tempreg, (int) BFD_RELOC_MIPS_HIGHEST);
 		macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
 			     tempreg, tempreg, (int) BFD_RELOC_MIPS_HIGHER);
-		macro_build (p, &icnt, NULL, "dsll", "d,w,<",
+		macro_build (p, &icnt, (expressionS *) NULL, "dsll", "d,w,<",
 			     tempreg, tempreg, 16);
 		macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
 			     tempreg, tempreg, (int) BFD_RELOC_HI16_S);
-		macro_build (p, &icnt, NULL, "dsll", "d,w,<",
+		macro_build (p, &icnt, (expressionS *) NULL, "dsll", "d,w,<",
 			     tempreg, tempreg, 16);
 		macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
 			     tempreg, tempreg, (int) BFD_RELOC_LO16);
@@ -4637,8 +4720,7 @@ macro (ip)
 	  frag_grow (32);
 	  if (expr1.X_add_number == 0 && tempreg == PIC_CALL_REG)
 	    lw_reloc_type = (int) BFD_RELOC_MIPS_CALL16;
-	  macro_build ((char *) NULL, &icnt, &offset_expr,
-		       dbl ? "ld" : "lw",
+	  macro_build ((char *) NULL, &icnt, &offset_expr, dbl ? "ld" : "lw",
 		       "t,o(b)", tempreg, lw_reloc_type, GP);
 	  if (expr1.X_add_number == 0)
 	    {
@@ -5426,12 +5500,12 @@ macro (ip)
 		  macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
 			       tempreg, tempreg, (int) BFD_RELOC_MIPS_HIGHER);
 		  if (breg != 0)
-		    macro_build (p, &icnt, NULL, "daddu", "d,v,t",
-				 AT, AT, breg);
-		  macro_build (p, &icnt, NULL, "dsll32", "d,w,<",
-			       tempreg, tempreg, 0);
-		  macro_build (p, &icnt, NULL, "daddu", "d,v,t",
-			       tempreg, tempreg, AT);
+		    macro_build (p, &icnt, (expressionS *) NULL, "daddu",
+				 "d,v,t", AT, AT, breg);
+		  macro_build (p, &icnt, (expressionS *) NULL, "dsll32",
+			       "d,w,<", tempreg, tempreg, 0);
+		  macro_build (p, &icnt, (expressionS *) NULL, "daddu",
+			       "d,v,t", tempreg, tempreg, AT);
 		  macro_build (p, &icnt, &offset_expr, s,
 			       fmt, treg, (int) BFD_RELOC_LO16, tempreg);
 		  used_at = 1;
@@ -5442,15 +5516,15 @@ macro (ip)
 			       tempreg, (int) BFD_RELOC_MIPS_HIGHEST);
 		  macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
 			       tempreg, tempreg, (int) BFD_RELOC_MIPS_HIGHER);
-		  macro_build (p, &icnt, NULL, "dsll", "d,w,<",
-			       tempreg, tempreg, 16);
+		  macro_build (p, &icnt, (expressionS *) NULL, "dsll",
+			       "d,w,<", tempreg, tempreg, 16);
 		  macro_build (p, &icnt, &offset_expr, "daddiu", "t,r,j",
 			       tempreg, tempreg, (int) BFD_RELOC_HI16_S);
-		  macro_build (p, &icnt, NULL, "dsll", "d,w,<",
-			       tempreg, tempreg, 16);
+		  macro_build (p, &icnt, (expressionS *) NULL, "dsll",
+			       "d,w,<", tempreg, tempreg, 16);
 		  if (breg != 0)
-		    macro_build (p, &icnt, NULL, "daddu", "d,v,t",
-				 tempreg, tempreg, breg);
+		    macro_build (p, &icnt, (expressionS *) NULL, "daddu",
+				 "d,v,t", tempreg, tempreg, breg);
 		  macro_build (p, &icnt, &offset_expr, s,
 			       fmt, treg, (int) BFD_RELOC_LO16, tempreg);
 		}
@@ -6402,10 +6469,10 @@ macro2 (ip)
     case M_DMUL:
       dbl = 1;
     case M_MUL:
-      macro_build ((char *) NULL, &icnt, NULL,
-		   dbl ? "dmultu" : "multu",
-		   "s,t", sreg, treg);
-      macro_build ((char *) NULL, &icnt, NULL, "mflo", "d", dreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
+		   dbl ? "dmultu" : "multu", "s,t", sreg, treg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "mflo", "d",
+		   dreg);
       return;
 
     case M_DMUL_I:
@@ -6415,9 +6482,10 @@ macro2 (ip)
 	 not trying to be that fancy. GCC should do this for us
 	 anyway.  */
       load_register (&icnt, AT, &imm_expr, dbl);
-      macro_build ((char *) NULL, &icnt, NULL,
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
 		   dbl ? "dmult" : "mult", "s,t", sreg, AT);
-      macro_build ((char *) NULL, &icnt, NULL, "mflo", "d", dreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "mflo", "d",
+		   dreg);
       break;
 
     case M_DMULO_I:
@@ -6435,23 +6503,29 @@ macro2 (ip)
       mips_any_noreorder = 1;
       if (imm)
 	load_register (&icnt, AT, &imm_expr, dbl);
-      macro_build ((char *) NULL, &icnt, NULL,
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
 		   dbl ? "dmult" : "mult", "s,t", sreg, imm ? AT : treg);
-      macro_build ((char *) NULL, &icnt, NULL, "mflo", "d", dreg);
-      macro_build ((char *) NULL, &icnt, NULL,
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "mflo", "d",
+		   dreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
 		   dbl ? "dsra32" : "sra", "d,w,<", dreg, dreg, 31);
-      macro_build ((char *) NULL, &icnt, NULL, "mfhi", "d", AT);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "mfhi", "d",
+		   AT);
       if (mips_trap)
-	macro_build ((char *) NULL, &icnt, NULL, "tne", "s,t", dreg, AT);
+	macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "tne", "s,t",
+		     dreg, AT);
       else
 	{
 	  expr1.X_add_number = 8;
-	  macro_build ((char *) NULL, &icnt, &expr1, "beq", "s,t,p", dreg, AT);
-	  macro_build ((char *) NULL, &icnt, NULL, "nop", "", 0);
-	  macro_build ((char *) NULL, &icnt, NULL, "break", "c", 6);
+	  macro_build ((char *) NULL, &icnt, &expr1, "beq", "s,t,p", dreg,
+		       AT);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", "",
+		       0);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break",
+		       "c", 6);
 	}
       --mips_opts.noreorder;
-      macro_build ((char *) NULL, &icnt, NULL, "mflo", "d", dreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "mflo", "d", dreg);
       break;
 
     case M_DMULOU_I:
@@ -6469,57 +6543,70 @@ macro2 (ip)
       mips_any_noreorder = 1;
       if (imm)
 	load_register (&icnt, AT, &imm_expr, dbl);
-      macro_build ((char *) NULL, &icnt, NULL,
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
 		   dbl ? "dmultu" : "multu",
 		   "s,t", sreg, imm ? AT : treg);
-      macro_build ((char *) NULL, &icnt, NULL, "mfhi", "d", AT);
-      macro_build ((char *) NULL, &icnt, NULL, "mflo", "d", dreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "mfhi", "d",
+		   AT);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "mflo", "d",
+		   dreg);
       if (mips_trap)
-	macro_build ((char *) NULL, &icnt, NULL, "tne", "s,t", AT, 0);
+	macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "tne", "s,t",
+		     AT, 0);
       else
 	{
 	  expr1.X_add_number = 8;
 	  macro_build ((char *) NULL, &icnt, &expr1, "beq", "s,t,p", AT, 0);
-	  macro_build ((char *) NULL, &icnt, NULL, "nop", "", 0);
-	  macro_build ((char *) NULL, &icnt, NULL, "break", "c", 6);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", "",
+		       0);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break",
+		       "c", 6);
 	}
       --mips_opts.noreorder;
       break;
 
     case M_ROL:
-      macro_build ((char *) NULL, &icnt, NULL, "subu", "d,v,t", AT, 0, treg);
-      macro_build ((char *) NULL, &icnt, NULL, "srlv", "d,t,s", AT, sreg, AT);
-      macro_build ((char *) NULL, &icnt, NULL, "sllv", "d,t,s", dreg, sreg,
-		   treg);
-      macro_build ((char *) NULL, &icnt, NULL, "or", "d,v,t", dreg, dreg, AT);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "subu",
+		   "d,v,t", AT, 0, treg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "srlv",
+		   "d,t,s", AT, sreg, AT);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sllv",
+		   "d,t,s", dreg, sreg, treg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "or",
+		   "d,v,t", dreg, dreg, AT);
       break;
 
     case M_ROL_I:
       if (imm_expr.X_op != O_constant)
 	as_bad (_("rotate count too large"));
-      macro_build ((char *) NULL, &icnt, NULL, "sll", "d,w,<", AT, sreg,
-		   (int) (imm_expr.X_add_number & 0x1f));
-      macro_build ((char *) NULL, &icnt, NULL, "srl", "d,w,<", dreg, sreg,
-		   (int) ((0 - imm_expr.X_add_number) & 0x1f));
-      macro_build ((char *) NULL, &icnt, NULL, "or", "d,v,t", dreg, dreg, AT);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sll", "d,w,<",
+		   AT, sreg, (int) (imm_expr.X_add_number & 0x1f));
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "srl", "d,w,<",
+		   dreg, sreg, (int) ((0 - imm_expr.X_add_number) & 0x1f));
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "or", "d,v,t",
+		   dreg, dreg, AT);
       break;
 
     case M_ROR:
-      macro_build ((char *) NULL, &icnt, NULL, "subu", "d,v,t", AT, 0, treg);
-      macro_build ((char *) NULL, &icnt, NULL, "sllv", "d,t,s", AT, sreg, AT);
-      macro_build ((char *) NULL, &icnt, NULL, "srlv", "d,t,s", dreg, sreg,
-		   treg);
-      macro_build ((char *) NULL, &icnt, NULL, "or", "d,v,t", dreg, dreg, AT);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "subu",
+		   "d,v,t", AT, 0, treg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sllv",
+		   "d,t,s", AT, sreg, AT);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "srlv",
+		   "d,t,s", dreg, sreg, treg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "or",
+		   "d,v,t", dreg, dreg, AT);
       break;
 
     case M_ROR_I:
       if (imm_expr.X_op != O_constant)
 	as_bad (_("rotate count too large"));
-      macro_build ((char *) NULL, &icnt, NULL, "srl", "d,w,<", AT, sreg,
-		   (int) (imm_expr.X_add_number & 0x1f));
-      macro_build ((char *) NULL, &icnt, NULL, "sll", "d,w,<", dreg, sreg,
-		   (int) ((0 - imm_expr.X_add_number) & 0x1f));
-      macro_build ((char *) NULL, &icnt, NULL, "or", "d,v,t", dreg, dreg, AT);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "srl", "d,w,<",
+		   AT, sreg, (int) (imm_expr.X_add_number & 0x1f));
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sll", "d,w,<",
+		   dreg, sreg, (int) ((0 - imm_expr.X_add_number) & 0x1f));
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "or", "d,v,t",
+		   dreg, dreg, AT);
       break;
 
     case M_S_DOB:
@@ -6549,8 +6636,8 @@ macro2 (ip)
 		     sreg, (int) BFD_RELOC_LO16);
       else
 	{
-	  macro_build ((char *) NULL, &icnt, NULL, "xor", "d,v,t", dreg,
-		       sreg, treg);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "xor",
+		       "d,v,t", dreg, sreg, treg);
 	  macro_build ((char *) NULL, &icnt, &expr1, "sltiu", "t,r,j", dreg,
 		       dreg, (int) BFD_RELOC_LO16);
 	}
@@ -6592,8 +6679,8 @@ macro2 (ip)
       else
 	{
 	  load_register (&icnt, AT, &imm_expr, 0);
-	  macro_build ((char *) NULL, &icnt, NULL, "xor", "d,v,t", dreg,
-		       sreg, AT);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "xor",
+		       "d,v,t", dreg, sreg, AT);
 	  used_at = 1;
 	}
       macro_build ((char *) NULL, &icnt, &expr1, "sltiu", "t,r,j", dreg, dreg,
@@ -6608,7 +6695,8 @@ macro2 (ip)
     case M_SGEU:
       s = "sltu";
     sge:
-      macro_build ((char *) NULL, &icnt, NULL, s, "d,v,t", dreg, sreg, treg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "d,v,t",
+		   dreg, sreg, treg);
       macro_build ((char *) NULL, &icnt, &expr1, "xori", "t,r,i", dreg, dreg,
 		   (int) BFD_RELOC_LO16);
       return;
@@ -6627,9 +6715,9 @@ macro2 (ip)
       else
 	{
 	  load_register (&icnt, AT, &imm_expr, 0);
-	  macro_build ((char *) NULL, &icnt, NULL,
-		       mask == M_SGE_I ? "slt" : "sltu",
-		       "d,v,t", dreg, sreg, AT);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
+		       mask == M_SGE_I ? "slt" : "sltu", "d,v,t", dreg, sreg,
+		       AT);
 	  used_at = 1;
 	}
       macro_build ((char *) NULL, &icnt, &expr1, "xori", "t,r,i", dreg, dreg,
@@ -6644,7 +6732,8 @@ macro2 (ip)
     case M_SGTU:
       s = "sltu";
     sgt:
-      macro_build ((char *) NULL, &icnt, NULL, s, "d,v,t", dreg, treg, sreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "d,v,t",
+		   dreg, treg, sreg);
       return;
 
     case M_SGT_I:		/* sreg > I  <==>  I < sreg */
@@ -6654,28 +6743,31 @@ macro2 (ip)
       s = "sltu";
     sgti:
       load_register (&icnt, AT, &imm_expr, 0);
-      macro_build ((char *) NULL, &icnt, NULL, s, "d,v,t", dreg, AT, sreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "d,v,t",
+		   dreg, AT, sreg);
       break;
 
-    case M_SLE:		/* sreg <= treg  <==>  treg >= sreg  <==>  not (treg < sreg) */
+    case M_SLE:	/* sreg <= treg  <==>  treg >= sreg  <==>  not (treg < sreg) */
       s = "slt";
       goto sle;
     case M_SLEU:
       s = "sltu";
     sle:
-      macro_build ((char *) NULL, &icnt, NULL, s, "d,v,t", dreg, treg, sreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "d,v,t",
+		   dreg, treg, sreg);
       macro_build ((char *) NULL, &icnt, &expr1, "xori", "t,r,i", dreg, dreg,
 		   (int) BFD_RELOC_LO16);
       return;
 
-    case M_SLE_I:		/* sreg <= I <==> I >= sreg <==> not (I < sreg) */
+    case M_SLE_I:	/* sreg <= I <==> I >= sreg <==> not (I < sreg) */
       s = "slt";
       goto slei;
     case M_SLEU_I:
       s = "sltu";
     slei:
       load_register (&icnt, AT, &imm_expr, 0);
-      macro_build ((char *) NULL, &icnt, NULL, s, "d,v,t", dreg, AT, sreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "d,v,t",
+		   dreg, AT, sreg);
       macro_build ((char *) NULL, &icnt, &expr1, "xori", "t,r,i", dreg, dreg,
 		   (int) BFD_RELOC_LO16);
       break;
@@ -6690,7 +6782,8 @@ macro2 (ip)
 	  return;
 	}
       load_register (&icnt, AT, &imm_expr, 0);
-      macro_build ((char *) NULL, &icnt, NULL, "slt", "d,v,t", dreg, sreg, AT);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "slt", "d,v,t",
+		   dreg, sreg, AT);
       break;
 
     case M_SLTU_I:
@@ -6703,31 +6796,31 @@ macro2 (ip)
 	  return;
 	}
       load_register (&icnt, AT, &imm_expr, 0);
-      macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", dreg, sreg,
-		   AT);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu",
+		   "d,v,t", dreg, sreg, AT);
       break;
 
     case M_SNE:
       if (sreg == 0)
-	macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", dreg, 0,
-		     treg);
+	macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu",
+		     "d,v,t", dreg, 0, treg);
       else if (treg == 0)
-	macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", dreg, 0,
-		     sreg);
+	macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu",
+		     "d,v,t", dreg, 0, sreg);
       else
 	{
-	  macro_build ((char *) NULL, &icnt, NULL, "xor", "d,v,t", dreg,
-		       sreg, treg);
-	  macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", dreg, 0,
-		       dreg);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "xor",
+		       "d,v,t", dreg, sreg, treg);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu",
+		       "d,v,t", dreg, 0, dreg);
 	}
       return;
 
     case M_SNE_I:
       if (imm_expr.X_op == O_constant && imm_expr.X_add_number == 0)
 	{
-	  macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", dreg, 0,
-		       sreg);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu",
+		       "d,v,t", dreg, 0, sreg);
 	  return;
 	}
       if (sreg == 0)
@@ -6760,11 +6853,12 @@ macro2 (ip)
       else
 	{
 	  load_register (&icnt, AT, &imm_expr, 0);
-	  macro_build ((char *) NULL, &icnt, NULL, "xor", "d,v,t", dreg,
-		       sreg, AT);
+	  macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "xor",
+		       "d,v,t", dreg, sreg, AT);
 	  used_at = 1;
 	}
-      macro_build ((char *) NULL, &icnt, NULL, "sltu", "d,v,t", dreg, 0, dreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sltu",
+		   "d,v,t", dreg, 0, dreg);
       if (used_at)
 	break;
       return;
@@ -6783,7 +6877,7 @@ macro2 (ip)
 	  return;
 	}
       load_register (&icnt, AT, &imm_expr, dbl);
-      macro_build ((char *) NULL, &icnt, NULL,
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
 		   dbl ? "dsub" : "sub", "d,v,t", dreg, sreg, AT);
       break;
 
@@ -6801,7 +6895,7 @@ macro2 (ip)
 	  return;
 	}
       load_register (&icnt, AT, &imm_expr, dbl);
-      macro_build ((char *) NULL, &icnt, NULL,
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
 		   dbl ? "dsubu" : "subu", "d,v,t", dreg, sreg, AT);
       break;
 
@@ -6824,7 +6918,8 @@ macro2 (ip)
       s = "tne";
     trap:
       load_register (&icnt, AT, &imm_expr, 0);
-      macro_build ((char *) NULL, &icnt, NULL, s, "s,t", sreg, AT);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "s,t", sreg,
+		   AT);
       break;
 
     case M_TRUNCWS:
@@ -6840,21 +6935,25 @@ macro2 (ip)
       mips_emit_delays (true);
       ++mips_opts.noreorder;
       mips_any_noreorder = 1;
-      macro_build ((char *) NULL, &icnt, NULL, "cfc1", "t,G", treg, 31);
-      macro_build ((char *) NULL, &icnt, NULL, "cfc1", "t,G", treg, 31);
-      macro_build ((char *) NULL, &icnt, NULL, "nop", "");
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "cfc1", "t,G",
+		   treg, 31);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "cfc1", "t,G",
+		   treg, 31);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", "");
       expr1.X_add_number = 3;
       macro_build ((char *) NULL, &icnt, &expr1, "ori", "t,r,i", AT, treg,
 		   (int) BFD_RELOC_LO16);
       expr1.X_add_number = 2;
       macro_build ((char *) NULL, &icnt, &expr1, "xori", "t,r,i", AT, AT,
 		     (int) BFD_RELOC_LO16);
-      macro_build ((char *) NULL, &icnt, NULL, "ctc1", "t,G", AT, 31);
-      macro_build ((char *) NULL, &icnt, NULL, "nop", "");
-      macro_build ((char *) NULL, &icnt, NULL,
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "ctc1", "t,G",
+		   AT, 31);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", "");
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
 	      mask == M_TRUNCWD ? "cvt.w.d" : "cvt.w.s", "D,S", dreg, sreg);
-      macro_build ((char *) NULL, &icnt, NULL, "ctc1", "t,G", treg, 31);
-      macro_build ((char *) NULL, &icnt, NULL, "nop", "");
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "ctc1", "t,G",
+		   treg, 31);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", "");
       --mips_opts.noreorder;
       break;
 
@@ -6877,8 +6976,10 @@ macro2 (ip)
 	offset_expr.X_add_number += 1;
       macro_build ((char *) NULL, &icnt, &offset_expr, "lbu", "t,o(b)", AT,
 		   (int) BFD_RELOC_LO16, breg);
-      macro_build ((char *) NULL, &icnt, NULL, "sll", "d,w,<", treg, treg, 8);
-      macro_build ((char *) NULL, &icnt, NULL, "or", "d,v,t", treg, treg, AT);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sll", "d,w,<",
+		   treg, treg, 8);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "or", "d,v,t",
+		   treg, treg, AT);
       break;
 
     case M_ULD:
@@ -6954,10 +7055,10 @@ macro2 (ip)
 	expr1.X_add_number = 0;
       macro_build ((char *) NULL, &icnt, &expr1, "lbu", "t,o(b)", AT,
 		   (int) BFD_RELOC_LO16, AT);
-      macro_build ((char *) NULL, &icnt, NULL, "sll", "d,w,<", treg,
-		   treg, 8);
-      macro_build ((char *) NULL, &icnt, NULL, "or", "d,v,t", treg,
-		   treg, AT);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sll", "d,w,<",
+		   treg, treg, 8);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "or", "d,v,t",
+		   treg, treg, AT);
       break;
 
     case M_USH:
@@ -6967,7 +7068,8 @@ macro2 (ip)
 	offset_expr.X_add_number += 1;
       macro_build ((char *) NULL, &icnt, &offset_expr, "sb", "t,o(b)", treg,
 		   (int) BFD_RELOC_LO16, breg);
-      macro_build ((char *) NULL, &icnt, NULL, "srl", "d,w,<", AT, treg, 8);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "srl", "d,w,<",
+		   AT, treg, 8);
       if (target_big_endian)
 	offset_expr.X_add_number -= 1;
       else
@@ -7041,8 +7143,8 @@ macro2 (ip)
 	expr1.X_add_number = 0;
       macro_build ((char *) NULL, &icnt, &expr1, "sb", "t,o(b)", treg,
 		   (int) BFD_RELOC_LO16, AT);
-      macro_build ((char *) NULL, &icnt, NULL, "srl", "d,w,<", treg,
-		   treg, 8);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "srl", "d,w,<",
+		   treg, treg, 8);
       if (! target_big_endian)
 	expr1.X_add_number = 1;
       else
@@ -7055,10 +7157,10 @@ macro2 (ip)
 	expr1.X_add_number = 1;
       macro_build ((char *) NULL, &icnt, &expr1, "lbu", "t,o(b)", AT,
 		   (int) BFD_RELOC_LO16, AT);
-      macro_build ((char *) NULL, &icnt, NULL, "sll", "d,w,<", treg,
-		   treg, 8);
-      macro_build ((char *) NULL, &icnt, NULL, "or", "d,v,t", treg,
-		   treg, AT);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "sll", "d,w,<",
+		   treg, treg, 8);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "or", "d,v,t",
+		   treg, treg, AT);
       break;
 
     default:
@@ -7117,19 +7219,20 @@ mips16_macro (ip)
       mips_emit_delays (true);
       ++mips_opts.noreorder;
       mips_any_noreorder = 1;
-      macro_build ((char *) NULL, &icnt, NULL,
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
 		   dbl ? "ddiv" : "div",
 		   "0,x,y", xreg, yreg);
       expr1.X_add_number = 2;
       macro_build ((char *) NULL, &icnt, &expr1, "bnez", "x,p", yreg);
-      macro_build ((char *) NULL, &icnt, NULL, "break", "6", 7);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break", "6",
+		   7);
 
       /* FIXME: The normal code checks for of -1 / -0x80000000 here,
          since that causes an overflow.  We should do that as well,
          but I don't see how to do the comparisons without a temporary
          register.  */
       --mips_opts.noreorder;
-      macro_build ((char *) NULL, &icnt, NULL, s, "x", zreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "x", zreg);
       break;
 
     case M_DIVU_3:
@@ -7151,20 +7254,23 @@ mips16_macro (ip)
       mips_emit_delays (true);
       ++mips_opts.noreorder;
       mips_any_noreorder = 1;
-      macro_build ((char *) NULL, &icnt, NULL, s, "0,x,y", xreg, yreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s, "0,x,y",
+		   xreg, yreg);
       expr1.X_add_number = 2;
       macro_build ((char *) NULL, &icnt, &expr1, "bnez", "x,p", yreg);
-	macro_build ((char *) NULL, &icnt, NULL, "break", "6", 7);
+	macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "break",
+		     "6", 7);
       --mips_opts.noreorder;
-      macro_build ((char *) NULL, &icnt, NULL, s2, "x", zreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s2, "x", zreg);
       break;
 
     case M_DMUL:
       dbl = 1;
     case M_MUL:
-      macro_build ((char *) NULL, &icnt, NULL,
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
 		   dbl ? "dmultu" : "multu", "x,y", xreg, yreg);
-      macro_build ((char *) NULL, &icnt, NULL, "mflo", "x", zreg);
+      macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "mflo", "x",
+		   zreg);
       return;
 
     case M_DSUBU_I:


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