Add support for AVX512BW instructions and their AVX512VL versions.
[deliverable/binutils-gdb.git] / opcodes / i386-gen.c
index 0bf14d934c7669d9501460eec8d08cfbef5407b8..6b7b9b39e8374e98718191c60275ecbed850e34b 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013
-   Free Software Foundation, Inc.
+/* Copyright (C) 2007-2014 Free Software Foundation, Inc.
 
    This file is part of the GNU opcodes library.
 
@@ -81,7 +80,7 @@ static initializer cpu_flag_init[] =
   { "CPU_K6_FLAGS",
     "Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuSYSCALL|Cpu387|CpuMMX" },
   { "CPU_K6_2_FLAGS",
-    "Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuSYSCALL|Cpu387|CpuNop|CpuMMX|Cpu3dnow" },
+    "Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuSYSCALL|Cpu387|CpuMMX|Cpu3dnow" },
   { "CPU_ATHLON_FLAGS",
     "Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuSYSCALL|Cpu387|Cpu687|CpuNop|CpuMMX|Cpu3dnow|Cpu3dnowA" },
   { "CPU_K8_FLAGS",
@@ -222,6 +221,20 @@ static initializer cpu_flag_init[] =
     "CpuMPX" },
   { "CPU_SHA_FLAGS",
     "CpuSHA" },
+  { "CPU_CLFLUSHOPT_FLAGS",
+    "CpuClflushOpt" },
+  { "CPU_XSAVES_FLAGS",
+    "CpuXSAVES" },
+  { "CPU_XSAVEC_FLAGS",
+    "CpuXSAVEC" },
+  { "CPU_PREFETCHWT1_FLAGS",
+    "CpuPREFETCHWT1" },
+  { "CPU_SE1_FLAGS",
+    "CpuSE1" },
+  { "CPU_AVX512BW_FLAGS",
+    "CpuMMX|CpuSSE|CpuSSE2|CpuSSE3|CpuSSSE3|CpuSSE4_1|CpuSSE4_2|CpuAVX|CpuAVX2|CpuAVX512F|CpuAVX512BW" },
+  { "CPU_AVX512VL_FLAGS",
+    "CpuMMX|CpuSSE|CpuSSE2|CpuSSE3|CpuSSSE3|CpuSSE4_1|CpuSSE4_2|CpuAVX|CpuAVX2|CpuAVX512F|CpuAVX512VL" },
 };
 
 static initializer operand_type_init[] =
@@ -370,6 +383,8 @@ static bitfield cpu_flags[] =
   BITFIELD (CpuAVX512CD),
   BITFIELD (CpuAVX512ER),
   BITFIELD (CpuAVX512PF),
+  BITFIELD (CpuAVX512VL),
+  BITFIELD (CpuAVX512BW),
   BITFIELD (CpuL1OM),
   BITFIELD (CpuK1OM),
   BITFIELD (CpuSSE4a),
@@ -410,6 +425,11 @@ static bitfield cpu_flags[] =
   BITFIELD (CpuSMAP),
   BITFIELD (CpuSHA),
   BITFIELD (CpuVREX),
+  BITFIELD (CpuClflushOpt),
+  BITFIELD (CpuXSAVES),
+  BITFIELD (CpuXSAVEC),
+  BITFIELD (CpuPREFETCHWT1),
+  BITFIELD (CpuSE1),
   BITFIELD (Cpu64),
   BITFIELD (CpuNo64),
   BITFIELD (CpuMPX),
@@ -567,8 +587,7 @@ static void
 process_copyright (FILE *fp)
 {
   fprintf (fp, "/* This file is automatically generated by i386-gen.  Do not edit!  */\n\
-/* Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013\n\
-   Free Software Foundation, Inc.\n\
+/* Copyright (C) 2007-2014 Free Software Foundation, Inc.\n\
 \n\
    This file is part of the GNU opcodes library.\n\
 \n\
@@ -704,7 +723,10 @@ output_cpu_flags (FILE *table, bitfield *flags, unsigned int size,
 
   for (i = 0; i < size - 1; i++)
     {
-      fprintf (table, "%d, ", flags[i].value);
+      if (((i + 1) % 20) != 0)
+       fprintf (table, "%d, ", flags[i].value);
+      else
+       fprintf (table, "%d,", flags[i].value);
       if (((i + 1) % 20) == 0)
        {
          /* We need \\ for macro.  */
@@ -792,7 +814,10 @@ output_opcode_modifier (FILE *table, bitfield *modifier, unsigned int size)
 
   for (i = 0; i < size - 1; i++)
     {
-      fprintf (table, "%d, ", modifier[i].value);
+      if (((i + 1) % 20) != 0)
+        fprintf (table, "%d, ", modifier[i].value);
+      else
+        fprintf (table, "%d,", modifier[i].value);
       if (((i + 1) % 20) == 0)
        fprintf (table, "\n      ");
     }
@@ -833,12 +858,15 @@ output_operand_type (FILE *table, bitfield *types, unsigned int size,
 
   for (i = 0; i < size - 1; i++)
     {
-      fprintf (table, "%d, ", types[i].value);
+      if (((i + 1) % 20) != 0)
+       fprintf (table, "%d, ", types[i].value);
+      else
+       fprintf (table, "%d,", types[i].value);
       if (((i + 1) % 20) == 0)
        {
          /* We need \\ for macro.  */
          if (macro)
-           fprintf (table, "\\\n%s", indent);
+           fprintf (table, " \\\n%s", indent);
          else
            fprintf (table, "\n%s", indent);
        }
This page took 0.027412 seconds and 4 git commands to generate.