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: Remove Vex_Imm4


Vex_Imm4 isn't used anymore. I am checking in this patch to remove it.


H.J.
----
gas/

2009-02-23  H.J. Lu  <hongjiu.lu@intel.com>

	* config/tc-i386.c (vex_imm4): Removed.
	(VEX_check_operands): Likewise.
	(match_template): Updated.

opcodes/

2009-02-23  H.J. Lu  <hongjiu.lu@intel.com>

	* i386-gen.c (operand_type_init): Remove OPERAND_TYPE_VEX_IMM4.
	(operand_types): Remove Vex_Imm4.

	* i386-opc.h (Vex_Imm4): Removed.
	(OTMax): Updated.
	(i386_operand_type): Remove vex_imm4.

	* i386-opc.tbl: Remove Vex_Imm4 comments.
	* i386-init.h: Regenerated.
	* i386-tbl.h: Likewise.

--- binutils/gas/config/tc-i386.c.foo	2009-02-09 16:16:37.000000000 -0800
+++ binutils/gas/config/tc-i386.c	2009-02-23 12:29:32.000000000 -0800
@@ -1398,7 +1398,6 @@ static const i386_operand_type imm64 = O
 static const i386_operand_type imm16_32 = OPERAND_TYPE_IMM16_32;
 static const i386_operand_type imm16_32s = OPERAND_TYPE_IMM16_32S;
 static const i386_operand_type imm16_32_32s = OPERAND_TYPE_IMM16_32_32S;
-static const i386_operand_type vex_imm4 = OPERAND_TYPE_VEX_IMM4;
 
 enum operand_type
 {
@@ -3572,29 +3571,6 @@ optimize_disp (void)
       }
 }
 
-/* Check if operands are valid for the instrucrtion.  Update VEX
-   operand types.  */
-
-static int
-VEX_check_operands (const template *t)
-{
-  if (!t->opcode_modifier.vex)
-    return 0;
-
-  /* Only check VEX_Imm4, which must be the first operand.  */
-  if (t->operand_types[0].bitfield.vex_imm4)
-    {
-      if (i.op[0].imms->X_op != O_constant
-	  || !fits_in_imm4 (i.op[0].imms->X_add_number))
-	return 1;
-
-      /* Turn off Imm8 so that update_imm won't complain.  */
-      i.types[0] = vex_imm4;
-    }
-
-  return 0;
-}
-
 static const template *
 match_template (void)
 {
@@ -3899,10 +3875,6 @@ check_reverse:
 	  continue;
 	}
 
-      /* Check if VEX operands are valid.  */
-      if (VEX_check_operands (t))
-	continue;
-
       /* We've found a match; break out of loop.  */
       break;
     }
--- binutils/opcodes/i386-gen.c.foo	2009-01-14 13:53:20.000000000 -0800
+++ binutils/opcodes/i386-gen.c	2009-02-23 12:26:57.000000000 -0800
@@ -234,8 +234,6 @@ static initializer operand_type_init[] =
     "Imm32|Imm32S|Imm64|Disp32" },
   { "OPERAND_TYPE_IMM32_32S_64_DISP32_64",
     "Imm32|Imm32S|Imm64|Disp32|Disp64" },
-  { "OPERAND_TYPE_VEX_IMM4",
-    "VEX_Imm4" },
 };
 
 typedef struct bitfield
@@ -396,7 +394,6 @@ static bitfield operand_types[] =
   BITFIELD (Ymmword),
   BITFIELD (Unspecified),
   BITFIELD (Anysize),
-  BITFIELD (Vex_Imm4),
 #ifdef OTUnused
   BITFIELD (OTUnused),
 #endif
--- binutils/opcodes/i386-opc.h.foo	2009-01-12 08:42:16.000000000 -0800
+++ binutils/opcodes/i386-opc.h	2009-02-23 12:26:30.000000000 -0800
@@ -447,11 +447,8 @@ typedef struct i386_opcode_modifier
 /* Any memory size.  */
 #define Anysize			(Unspecified  + 1)
 
-/* VEX 4 bit immediate */
-#define Vex_Imm4		(Anysize + 1)
-
 /* The last bitfield in i386_operand_type.  */
-#define OTMax			Vex_Imm4
+#define OTMax			Anysize
 
 #define OTNumOfUints \
   (OTMax / sizeof (unsigned int) / CHAR_BIT + 1)
@@ -510,7 +507,6 @@ typedef union i386_operand_type
       unsigned int ymmword:1;
       unsigned int unspecified:1;
       unsigned int anysize:1;
-      unsigned int vex_imm4:1;
 #ifdef OTUnused
       unsigned int unused:(OTNumOfBits - OTUnused);
 #endif
--- binutils/opcodes/i386-opc.tbl.foo	2009-02-09 16:16:37.000000000 -0800
+++ binutils/opcodes/i386-opc.tbl	2009-02-23 12:33:44.000000000 -0800
@@ -1767,9 +1767,6 @@ pclmulhqhqdq, 2, 0x660f3a44, 0x11, 3, Cp
 
 // AVX instructions.
 
-// We add Imm8 to Vex_Imm4.  We use Imm8 to indicate that the operand
-// is an immediate.  We will check if its value will fit 4 bits.
-
 vaddpd, 3, 0x6658, None, 1, CpuAVX, Modrm|Vex|Vex0F|VexNDS|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Xmmword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM, RegXMM }
 vaddpd, 3, 0x6658, None, 1, CpuAVX, Modrm|Vex|Vex0F|Vex256|VexNDS|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Ymmword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegYMM, RegYMM, RegYMM }
 vaddps, 3, 0x58, None, 1, CpuAVX, Modrm|Vex|Vex0F|VexNDS|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Xmmword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM, RegXMM }


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