[NDS32] Print pipeline model in asm header.
authorChung-Ju Wu <jasonwucj@gmail.com>
Sun, 20 May 2018 05:09:49 +0000 (05:09 +0000)
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>
Sun, 20 May 2018 05:09:49 +0000 (05:09 +0000)
gcc/
* config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
* config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
(TARGET_PIPELINE_N8): Likewise.
(TARGET_PIPELINE_N10): Likewise.
(TARGET_PIPELINE_N13): Likewise.
(TARGET_PIPELINE_GRAYWOLF): Likewise.

From-SVN: r260409

gcc/ChangeLog
gcc/config/nds32/nds32.c
gcc/config/nds32/nds32.h

index df7547e07313df1870a785da3722e7db48398ac1..3672440a72d48a6149fc76aac8262c916292fcec 100644 (file)
@@ -1,3 +1,12 @@
+2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
+
+       * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
+       * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
+       (TARGET_PIPELINE_N8): Likewise.
+       (TARGET_PIPELINE_N10): Likewise.
+       (TARGET_PIPELINE_N13): Likewise.
+       (TARGET_PIPELINE_GRAYWOLF): Likewise.
+
 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
 
        * config/nds32/nds32-fpu.md: Update copyright year.
index 632a54477c31d896c4db005d2fcf01fa5b5bdcc3..0b6f109b736e46ebff724c1af6d163d813fcb507 100644 (file)
@@ -3131,6 +3131,49 @@ nds32_asm_file_start (void)
   if (TARGET_ISA_V3M)
     fprintf (asm_out_file, "\t! ISA family\t\t: %s\n", "V3M");
 
+  switch (nds32_cpu_option)
+    {
+    case CPU_N6:
+      fprintf (asm_out_file, "\t! Pipeline model\t: %s\n", "N6");
+      break;
+
+    case CPU_N7:
+      fprintf (asm_out_file, "\t! Pipeline model\t: %s\n", "N7");
+      break;
+
+    case CPU_N8:
+      fprintf (asm_out_file, "\t! Pipeline model\t: %s\n", "N8");
+      break;
+
+    case CPU_E8:
+      fprintf (asm_out_file, "\t! Pipeline model\t: %s\n", "E8");
+      break;
+
+    case CPU_N9:
+      fprintf (asm_out_file, "\t! Pipeline model\t: %s\n", "N9");
+      break;
+
+    case CPU_N10:
+      fprintf (asm_out_file, "\t! Pipeline model\t: %s\n", "N10");
+      break;
+
+    case CPU_GRAYWOLF:
+      fprintf (asm_out_file, "\t! Pipeline model\t: %s\n", "Graywolf");
+      break;
+
+    case CPU_N12:
+    case CPU_N13:
+      fprintf (asm_out_file, "\t! Pipeline model\t: %s\n", "N13");
+      break;
+
+    case CPU_SIMPLE:
+      fprintf (asm_out_file, "\t! Pipeline model\t: %s\n", "SIMPLE");
+      break;
+
+    default:
+      gcc_unreachable ();
+    }
+
   if (TARGET_CMODEL_SMALL)
     fprintf (asm_out_file, "\t! Code model\t\t: %s\n", "SMALL");
   if (TARGET_CMODEL_MEDIUM)
index 9ba5e179dbfa68b25949ffc396244ddf8791691d..e00622b58be8a849dd872ea48b8b39dcdf1656d4 100644 (file)
@@ -853,8 +853,19 @@ enum nds32_builtins
    || nds32_arch_option == ARCH_V3S)
 #define TARGET_ISA_V3M  (nds32_arch_option == ARCH_V3M)
 
+#define TARGET_PIPELINE_N7 \
+  (nds32_cpu_option == CPU_N7)
+#define TARGET_PIPELINE_N8 \
+  (nds32_cpu_option == CPU_N6 \
+   || nds32_cpu_option == CPU_N8)
 #define TARGET_PIPELINE_N9 \
   (nds32_cpu_option == CPU_N9)
+#define TARGET_PIPELINE_N10 \
+  (nds32_cpu_option == CPU_N10)
+#define TARGET_PIPELINE_N13 \
+  (nds32_cpu_option == CPU_N12 || nds32_cpu_option == CPU_N13)
+#define TARGET_PIPELINE_GRAYWOLF \
+  (nds32_cpu_option == CPU_GRAYWOLF)
 #define TARGET_PIPELINE_SIMPLE \
   (nds32_cpu_option == CPU_SIMPLE)