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]

[MIPS, committed] Remove +I operand type


+I was only used by the DEXT and DINS macros that I've just removed,
so let's get rid of that too.  We can easily reinstate it if we need
it again later.

Tested on various targets and applied.

Richard


include/opcode/
	* mips.h: Remove references to "+I" and imm2_expr.

gas/
	* config/tc-mips.c (imm2_expr): Delete.
	(md_assemble, match_insn, imm2_expr.X_op, mips_ip): Update accordingly.

Index: include/opcode/mips.h
===================================================================
--- include/opcode/mips.h	2013-08-19 19:13:46.264476547 +0100
+++ include/opcode/mips.h	2013-08-19 19:13:48.589497158 +0100
@@ -799,7 +799,6 @@ struct mips_opcode
    Macro instructions:
    "A" General 32 bit expression
    "I" 32 bit immediate (value placed in imm_expr).
-   "+I" 32 bit immediate (value placed in imm2_expr).
    "F" 64 bit floating point constant in .rdata
    "L" 64 bit floating point constant in .lit8
    "f" 32 bit floating point constant
@@ -906,7 +905,7 @@ struct mips_opcode
    Extension character sequences used so far ("+" followed by the
    following), for quick reference when adding more:
    "1234567890"
-   "ABCEFGHIJKLMNPQSXZ"
+   "ABCEFGHJKLMNPQSXZ"
    "abcfgijmpqrstxyz"
 */
 
@@ -2025,7 +2024,6 @@ #define MICROMIPSOP_MASK_EVAOFFSET	0x1ff
    Macro instructions:
    "A" general 32 bit expression
    "I" 32-bit immediate (value placed in imm_expr).
-   "+I" 32-bit immediate (value placed in imm2_expr).
    "F" 64-bit floating point constant in .rdata
    "L" 64-bit floating point constant in .lit8
    "f" 32-bit floating point constant
@@ -2062,7 +2060,7 @@ #define MICROMIPSOP_MASK_EVAOFFSET	0x1ff
    following), for quick reference when adding more:
    ""
    ""
-   "ABCEFGHI"
+   "ABCEFGH"
    "ij"
 
    Extension character sequences used so far ("m" followed by the
Index: gas/config/tc-mips.c
===================================================================
--- gas/config/tc-mips.c	2013-08-19 19:13:46.263476538 +0100
+++ gas/config/tc-mips.c	2013-08-19 19:13:48.589497158 +0100
@@ -1762,11 +1762,10 @@ mips_mark_labels (void)
 
 static char *expr_end;
 
-/* Expressions which appear in macro instructions.  These are set by
-   mips_ip and read by macro.  */
+/* An expression in a macro instruction.  This is set by mips_ip and
+   mips16_ip.  */
 
 static expressionS imm_expr;
-static expressionS imm2_expr;
 
 /* The relocatable field in an instruction and the relocs associated
    with it.  These variables are used for instructions like LUI and
@@ -3584,7 +3583,6 @@ md_assemble (char *str)
     = {BFD_RELOC_UNUSED, BFD_RELOC_UNUSED, BFD_RELOC_UNUSED};
 
   imm_expr.X_op = O_absent;
-  imm2_expr.X_op = O_absent;
   offset_expr.X_op = O_absent;
   offset_reloc[0] = BFD_RELOC_UNUSED;
   offset_reloc[1] = BFD_RELOC_UNUSED;
@@ -7024,7 +7022,6 @@ match_insn (struct mips_cl_insn *insn, c
   char c;
 
   imm_expr.X_op = O_absent;
-  imm2_expr.X_op = O_absent;
   offset_expr.X_op = O_absent;
   offset_reloc[0] = BFD_RELOC_UNUSED;
   offset_reloc[1] = BFD_RELOC_UNUSED;
@@ -7129,16 +7126,6 @@ match_insn (struct mips_cl_insn *insn, c
 	case '+':
 	  switch (args[1])
 	    {
-	    case 'I':
-	      /* "+I" is like "I", except that imm2_expr is used.  */
-	      if (!match_const_int (&arg, &imm2_expr.X_add_number))
-		return FALSE;
-	      imm2_expr.X_op = O_constant;
-	      if (HAVE_32BIT_GPRS)
-		normalize_constant_expr (&imm2_expr);
-	      ++args;
-	      continue;
-
 	    case 'i':
 	      *offset_reloc = BFD_RELOC_MIPS_JMP;
 	      break;
@@ -7260,7 +7247,6 @@ match_mips16_insn (struct mips_cl_insn *
 
   create_insn (insn, opcode);
   imm_expr.X_op = O_absent;
-  imm2_expr.X_op = O_absent;
   offset_expr.X_op = O_absent;
   offset_reloc[0] = BFD_RELOC_UNUSED;
   offset_reloc[1] = BFD_RELOC_UNUSED;
@@ -12933,11 +12919,10 @@ mips_lookup_insn (struct hash_control *h
 }
 
 /* Assemble an instruction into its binary format.  If the instruction
-   is a macro, set imm_expr, imm2_expr and offset_expr to the values
-   associated with "I", "+I" and "A" operands respectively.  Otherwise
-   store the value of the relocatable field (if any) in offset_expr.
-   In both cases set offset_reloc to the relocation operators applied
-   to offset_expr.  */
+   is a macro, set imm_expr and offset_expr to the values associated
+   with "I" and "A" operands respectively.  Otherwise store the value
+   of the relocatable field (if any) in offset_expr.  In both cases
+   set offset_reloc to the relocation operators applied to offset_expr.  */
 
 static void
 mips_ip (char *str, struct mips_cl_insn *insn)


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