[PATCH 09/20] MIPS/GAS: Move M_S_DOB code next to its counterparts

Maciej W. Rozycki macro@codesourcery.com
Thu Dec 2 19:20:00 GMT 2010


Hi,

 This change moves code to handle the S.D o(b) macro next to its 
counterpart ones.  No functional change.

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

	gas/
	* config/tc-mips.c (macro)[M_S_DOB]: Fix the placement of code.

 OK to apply?

  Maciej

binutils-gas-mips-sdob.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
@@ -7068,6 +7068,17 @@ macro (struct mips_cl_insn *ip)
 		   target_big_endian ? treg : treg + 1, r, breg);
       break;
 
+    case M_S_DOB:
+      gas_assert (mips_opts.isa == ISA_MIPS1);
+      /* Even on a big endian machine $fn comes before $fn+1.  We have
+	 to adjust when storing to memory.  */
+      macro_build (&offset_expr, "swc1", "T,o(b)",
+		   target_big_endian ? treg + 1 : treg, BFD_RELOC_LO16, breg);
+      offset_expr.X_add_number += 4;
+      macro_build (&offset_expr, "swc1", "T,o(b)",
+		   target_big_endian ? treg : treg + 1, BFD_RELOC_LO16, breg);
+      break;
+
     case M_L_DAB:
       /*
        * The MIPS assembler seems to check for X_add_number not
@@ -7672,17 +7683,6 @@ macro (struct mips_cl_insn *ip)
       }
       break;
 
-    case M_S_DOB:
-      gas_assert (mips_opts.isa == ISA_MIPS1);
-      /* Even on a big endian machine $fn comes before $fn+1.  We have
-	 to adjust when storing to memory.  */
-      macro_build (&offset_expr, "swc1", "T,o(b)",
-		   target_big_endian ? treg + 1 : treg, BFD_RELOC_LO16, breg);
-      offset_expr.X_add_number += 4;
-      macro_build (&offset_expr, "swc1", "T,o(b)",
-		   target_big_endian ? treg : treg + 1, BFD_RELOC_LO16, breg);
-      break;
-
     case M_SEQ:
       if (sreg == 0)
 	macro_build (&expr1, "sltiu", "t,r,j", dreg, treg, BFD_RELOC_LO16);



More information about the Binutils mailing list