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]

[PATCH] MIPS/GAS: Fix negative conditionals


Hi,

 Two negative conditionals have escaped our recent microMIPS review 
process, here's a change to fix them.

 Regression-tested successfully, for the mips-linux-gnu and mips-sde-elf 
targets.  OK to apply?

2011-10-24  Maciej W. Rozycki  <macro@codesourcery.com>

	gas/
	* config/tc-mips.c (macro_build_jalr): Reverse a negative
	conditional.
	(mips_ip): Likewise.

  Maciej

binutils-gas-negative.diff
Index: binutils-fsf-trunk-quilt/gas/config/tc-mips.c
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/config/tc-mips.c	2011-10-24 22:15:37.455860174 +0100
+++ binutils-fsf-trunk-quilt/gas/config/tc-mips.c	2011-10-24 22:15:38.355861017 +0100
@@ -5260,9 +5260,7 @@ macro_build_jalr (expressionS *ep, int c
       frag_grow (8);
       f = frag_more (0);
     }
-  if (!mips_opts.micromips)
-    macro_build (NULL, "jalr", "d,s", RA, PIC_CALL_REG);
-  else
+  if (mips_opts.micromips)
     {
       jalr = mips_opts.noreorder && !cprestore ? "jalr" : "jalrs";
       if (MIPS_JALR_HINT_P (ep))
@@ -5270,6 +5268,8 @@ macro_build_jalr (expressionS *ep, int c
       else
 	macro_build (NULL, jalr, "mj", PIC_CALL_REG);
     }
+  else
+    macro_build (NULL, "jalr", "d,s", RA, PIC_CALL_REG);
   if (MIPS_JALR_HINT_P (ep))
     fix_new_exp (frag_now, f - frag_now->fr_literal, 4, ep, FALSE, jalr_reloc);
 }
@@ -10964,9 +10964,9 @@ mips_ip (char *str, struct mips_cl_insn 
 
 	    case '\\':		/* 3-bit bit position.  */
 	      {
-		unsigned long mask = (!mips_opts.micromips
-				      ? OP_MASK_3BITPOS
-				      : MICROMIPSOP_MASK_3BITPOS);
+		unsigned long mask = (mips_opts.micromips
+				      ? MICROMIPSOP_MASK_3BITPOS
+				      : OP_MASK_3BITPOS);
 
 		my_getExpression (&imm_expr, s);
 		check_absolute_expr (ip, &imm_expr);


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