aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/nds32/nds32.c43
-rw-r--r--gcc/config/nds32/nds32.h11
3 files changed, 63 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index df7547e..3672440 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c
index 632a544..0b6f109 100644
--- a/gcc/config/nds32/nds32.c
+++ b/gcc/config/nds32/nds32.c
@@ -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)
diff --git a/gcc/config/nds32/nds32.h b/gcc/config/nds32/nds32.h
index 9ba5e17..e00622b 100644
--- a/gcc/config/nds32/nds32.h
+++ b/gcc/config/nds32/nds32.h
@@ -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)