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 06/20] MIPS/GAS: Remove useless trailing 0 from NOP requests


Hi,

 In a couple of places throughout macro(), there is an unnecessary 
trailing 0 argument included in variadic macro_build() calls made to 
request a NOP instruction.  As an empty operand format specifier string is 
used no further arguments are processed by that function.

2010-12-02  Maciej W. Rozycki  <macro@codesourcery.com>

	gas/
	* config/tc-mips.c (macro): Remove a trailing 0 from NOP
	requests.

 OK to apply?

  Maciej

binutils-gas-mips-nop.diff
Index: binutils-fsf-trunk-quilt/gas/config/tc-mips.c
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/config/tc-mips.c	2010-12-01 21:05:50.000000000 +0000
+++ binutils-fsf-trunk-quilt/gas/config/tc-mips.c	2010-12-01 21:05:50.000000000 +0000
@@ -4854,7 +4854,7 @@ macro (struct mips_cl_insn *ip)
       expr1.X_add_number = 8;
       macro_build (&expr1, "bgez", "s,p", sreg);
       if (dreg == sreg)
-	macro_build (NULL, "nop", "", 0);
+	macro_build (NULL, "nop", "");
       else
 	move_register (dreg, sreg);
       macro_build (NULL, dbl ? "dsub" : "sub", "d,v,t", dreg, 0, sreg);
@@ -5005,7 +5005,7 @@ macro (struct mips_cl_insn *ip)
 	do_false:
 	  /* Result is always false.  */
 	  if (! likely)
-	    macro_build (NULL, "nop", "", 0);
+	    macro_build (NULL, "nop", "");
 	  else
 	    macro_build (&offset_expr, "bnel", "s,t,p", ZERO, ZERO);
 	  break;
@@ -5421,7 +5421,7 @@ macro (struct mips_cl_insn *ip)
 	{
 	  expr1.X_add_number = 8;
 	  macro_build (&expr1, "bne", "s,t,p", sreg, AT);
-	  macro_build (NULL, "nop", "", 0);
+	  macro_build (NULL, "nop", "");
 
 	  /* We want to close the noreorder block as soon as possible, so
 	     that later insns are available for delay slot filling.  */
@@ -7450,7 +7450,7 @@ macro (struct mips_cl_insn *ip)
 	{
 	  expr1.X_add_number = 8;
 	  macro_build (&expr1, "beq", "s,t,p", dreg, AT);
-	  macro_build (NULL, "nop", "", 0);
+	  macro_build (NULL, "nop", "");
 	  macro_build (NULL, "break", "c", 6);
 	}
       end_noreorder ();
@@ -7481,7 +7481,7 @@ macro (struct mips_cl_insn *ip)
 	{
 	  expr1.X_add_number = 8;
 	  macro_build (&expr1, "beq", "s,t,p", AT, ZERO);
-	  macro_build (NULL, "nop", "", 0);
+	  macro_build (NULL, "nop", "");
 	  macro_build (NULL, "break", "c", 6);
 	}
       end_noreorder ();


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