diff options
author | Andreas Krebbel <krebbel1@de.ibm.com> | 2008-05-28 14:09:51 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel1@de.ibm.com> | 2008-05-28 14:09:51 +0000 |
commit | 3826ba71fc680ad04839c0964fdca662fd40e2d8 (patch) | |
tree | 75b8922825d4a95411c84fb5daa752333989ea41 /gcc/config/s390/s390.c | |
parent | fca1632c2760938c6b3520c312aa7b595d9ffdbe (diff) |
2008-05-28 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.c (z10_cost): New cost function for z10.
(s390_handle_arch_option, override_options): Support
-march=z10 switch.
(s390_issue_rate): Adjust issue rate for z10.
* config/s390/s390.h (processor_type): Add PROCESSOR_2097_Z10.
(processor_flags): Add PF_Z10.
(TARGET_CPU_Z10, TARGET_Z10): New macro definitions.
* config/s390/s390.md (cpu, cpu_facility attributes): Add z10.
* gcc/config.gcc: Add z10.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@136097 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/s390/s390.c')
-rw-r--r-- | gcc/config/s390/s390.c | 70 |
1 files changed, 59 insertions, 11 deletions
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 95fee4d63c4..37660a25872 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -188,6 +188,38 @@ struct processor_costs z9_109_cost = COSTS_N_INSNS (24), /* DSGR */ }; +static const +struct processor_costs z10_cost = +{ + COSTS_N_INSNS (4), /* M */ + COSTS_N_INSNS (2), /* MGHI */ + COSTS_N_INSNS (2), /* MH */ + COSTS_N_INSNS (2), /* MHI */ + COSTS_N_INSNS (4), /* ML */ + COSTS_N_INSNS (4), /* MR */ + COSTS_N_INSNS (5), /* MS */ + COSTS_N_INSNS (6), /* MSG */ + COSTS_N_INSNS (4), /* MSGF */ + COSTS_N_INSNS (4), /* MSGFR */ + COSTS_N_INSNS (4), /* MSGR */ + COSTS_N_INSNS (4), /* MSR */ + COSTS_N_INSNS (1), /* multiplication in DFmode */ + COSTS_N_INSNS (28), /* MXBR */ + COSTS_N_INSNS (130), /* SQXBR */ + COSTS_N_INSNS (66), /* SQDBR */ + COSTS_N_INSNS (38), /* SQEBR */ + COSTS_N_INSNS (1), /* MADBR */ + COSTS_N_INSNS (1), /* MAEBR */ + COSTS_N_INSNS (60), /* DXBR */ + COSTS_N_INSNS (40), /* DDBR */ + COSTS_N_INSNS (26), /* DEBR */ + COSTS_N_INSNS (30), /* DLGR */ + COSTS_N_INSNS (23), /* DLR */ + COSTS_N_INSNS (23), /* DR */ + COSTS_N_INSNS (24), /* DSGFR */ + COSTS_N_INSNS (24), /* DSGR */ +}; + extern int reload_completed; /* Save information from a "cmpxx" operation until the branch or scc is @@ -1365,6 +1397,8 @@ s390_handle_arch_option (const char *arg, | PF_LONG_DISPLACEMENT | PF_EXTIMM}, {"z9-ec", PROCESSOR_2094_Z9_109, PF_IEEE_FLOAT | PF_ZARCH | PF_LONG_DISPLACEMENT | PF_EXTIMM | PF_DFP }, + {"z10", PROCESSOR_2097_Z10, PF_IEEE_FLOAT | PF_ZARCH + | PF_LONG_DISPLACEMENT | PF_EXTIMM | PF_DFP | PF_Z10}, }; size_t i; @@ -1472,13 +1506,21 @@ override_options (void) } /* Set processor cost function. */ - if (s390_tune == PROCESSOR_2094_Z9_109) - s390_cost = &z9_109_cost; - else if (s390_tune == PROCESSOR_2084_Z990) - s390_cost = &z990_cost; - else - s390_cost = &z900_cost; - + switch (s390_tune) + { + case PROCESSOR_2084_Z990: + s390_cost = &z990_cost; + break; + case PROCESSOR_2094_Z9_109: + s390_cost = &z9_109_cost; + break; + case PROCESSOR_2097_Z10: + s390_cost = &z10_cost; + break; + default: + s390_cost = &z900_cost; + } + if (TARGET_BACKCHAIN && TARGET_PACKED_STACK && TARGET_HARD_FLOAT) error ("-mbackchain -mpacked-stack -mhard-float are not supported " "in combination"); @@ -4930,10 +4972,16 @@ s390_adjust_priority (rtx insn ATTRIBUTE_UNUSED, int priority) static int s390_issue_rate (void) { - if (s390_tune == PROCESSOR_2084_Z990 - || s390_tune == PROCESSOR_2094_Z9_109) - return 3; - return 1; + switch (s390_tune) + { + case PROCESSOR_2084_Z990: + case PROCESSOR_2094_Z9_109: + return 3; + case PROCESSOR_2097_Z10: + return 2; + default: + return 1; + } } static int |