2009-10-01 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
[deliverable/binutils-gdb.git] / opcodes / i386-gen.c
index 9c94e78fdf9271cf409b8fcea64433c79db34ba1..337f93cc41b19e80479f2d1f43b7ee526d98296d 100644 (file)
@@ -347,7 +347,6 @@ static bitfield opcode_modifiers[] =
   BITFIELD (Rex64),
   BITFIELD (Ugh),
   BITFIELD (Vex),
-  BITFIELD (Vex256),
   BITFIELD (VexNDS),
   BITFIELD (VexNDD),
   BITFIELD (VexW0),
@@ -540,6 +539,29 @@ set_bitfield (const char *f, bitfield *array, int value,
        return;
       }
 
+  if (value)
+    {
+      const char *v = strchr (f, '=');
+
+      if (v)
+       {
+         size_t n = v - f;
+         char *end;
+
+         for (i = 0; i < size; i++)
+           if (strncasecmp (array[i].name, f, n) == 0)
+             {
+               value = strtol (v + 1, &end, 0);
+               if (*end == '\0')
+                 {
+                   array[i].value = value;
+                   return;
+                 }
+               break;
+             }
+       }
+    }
+
   if (lineno != -1)
     fail (_("%s: %d: Unknown bitfield: %s\n"), filename, lineno, f);
   else
@@ -876,7 +898,7 @@ process_i386_opcodes (FILE *table)
                                         xcalloc, free);
 
   fprintf (table, "\n/* i386 opcode table.  */\n\n");
-  fprintf (table, "const template i386_optab[] =\n{\n");
+  fprintf (table, "const insn_template i386_optab[] =\n{\n");
 
   /* Put everything on opcode array.  */
   while (!feof (fp))
This page took 0.034984 seconds and 4 git commands to generate.