From: Chung-Ju Wu Date: Sun, 20 May 2018 05:09:49 +0000 (+0000) Subject: [NDS32] Print pipeline model in asm header. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dd000841cad4f013ef79ef97a26d3ec673765186;p=gcc.git [NDS32] Print pipeline model in asm header. 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index df7547e0731..3672440a72d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2018-05-19 Chung-Ju Wu + + * 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 * config/nds32/nds32-fpu.md: Update copyright year. diff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c index 632a54477c3..0b6f109b736 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 9ba5e179dbf..e00622b58be 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)