s390.c (struct processor_costs): 4 new fields: ddbr, ddr, debr, der.

2005-01-10  Mark Dettinger  <dettinge@de.ibm.com>

	* config/s390/s390.c (struct processor_costs): 4 new fields:
	ddbr, ddr, debr, der.
	(s390_rtx_costs): More precise handling of divide instructions.

From-SVN: r93142
This commit is contained in:
Mark Dettinger 2005-01-10 16:06:21 +00:00 committed by Ulrich Weigand
parent 9975796166
commit 98fd0d70ae
2 changed files with 40 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2005-01-10 Mark Dettinger <dettinge@de.ibm.com>
* config/s390/s390.c (struct processor_costs): 4 new fields:
ddbr, ddr, debr, der.
(s390_rtx_costs): More precise handling of divide instructions.
2005-01-10 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/t-aix43 (BOOT_LDFLAGS): Define.

View File

@ -90,6 +90,7 @@ static enum machine_mode s390_cc_modes_compatible (enum machine_mode,
struct processor_costs
{
/* multiplication */
const int m; /* cost of an M instruction. */
const int mghi; /* cost of an MGHI instruction. */
const int mh; /* cost of an MH instruction. */
@ -103,10 +104,17 @@ struct processor_costs
const int msgr; /* cost of an MSGR instruction. */
const int msr; /* cost of an MSR instruction. */
const int mult_df; /* cost of multiplication in DFmode. */
/* square root */
const int sqdbr; /* cost of square root in DFmode. */
const int sqebr; /* cost of square root in SFmode. */
/* multiply and add */
const int madbr; /* cost of multiply and add in DFmode. */
const int maebr; /* cost of multiply and add in SFmode. */
/* division */
const int ddbr;
const int ddr;
const int debr;
const int der;
};
const struct processor_costs *s390_cost;
@ -131,6 +139,10 @@ struct processor_costs z900_cost =
COSTS_N_INSNS (35), /* SQEBR */
COSTS_N_INSNS (18), /* MADBR */
COSTS_N_INSNS (13), /* MAEBR */
COSTS_N_INSNS (30), /* DDBR */
COSTS_N_INSNS (30), /* DDR */
COSTS_N_INSNS (27), /* DEBR */
COSTS_N_INSNS (26), /* DER */
};
static const
@ -153,6 +165,10 @@ struct processor_costs z990_cost =
COSTS_N_INSNS (38), /* SQEBR */
COSTS_N_INSNS (1), /* MADBR */
COSTS_N_INSNS (1), /* MAEBR */
COSTS_N_INSNS (40), /* DDBR */
COSTS_N_INSNS (44), /* DDR */
COSTS_N_INSNS (26), /* DDBR */
COSTS_N_INSNS (28), /* DER */
};
@ -1982,6 +1998,24 @@ s390_rtx_costs (rtx x, int code, int outer_code, int *total)
return false;
case DIV:
if (GET_MODE (x) == SFmode)
{
if (TARGET_IEEE_FLOAT)
*total = s390_cost->debr;
else /* TARGET_IBM_FLOAT */
*total = s390_cost->der;
}
else if (GET_MODE (x) == DFmode)
{
if (TARGET_IEEE_FLOAT)
*total = s390_cost->ddbr;
else /* TARGET_IBM_FLOAT */
*total = s390_cost->ddr;
}
else
*total = COSTS_N_INSNS (33);
return false;
case UDIV:
case MOD:
case UMOD: