Commit c1bd2d66 by Eric Christopher Committed by Eric Christopher

mips.h (processor_type): Remove PROCESSOR_DEFAULT, add PROCESSOR_MAX.

2005-06-02  Eric Christopher  <echristo@redhat.com>

	* config/mips/mips.h (processor_type): Remove PROCESSOR_DEFAULT,
	add PROCESSOR_MAX.
	(mips_rtx_cost_data): New datatype.
	(MEMORY_MOVE_COST): Use data from structure.
	(BRANCH_COST): Ditto.
	(LOGICAL_OP_NON_SHORT_CIRCUIT): Define to zero.
	* config/mips/mips.md (cpu): Rework for processor_type changes.
	* config/mips/mips.c (mips_cost): New variable.
	(DEFAULT_COSTS): Define.
	(mips_rtx_cost_data): New.
	(mips_rtx_costs): Use. Minor formatting changes. Use COSTS_N_INSNS
	for NEG cost. Add support for FLOAT, UNSIGNED_FLOAT, FIX,
	FLOAT_EXTEND, FLOAT_TRUNCATE, and SQRT.
	(override_options): Set cost data.
	(mips_register_move_cost): Formatting changes.
	(bdesc_arrays): Use PROCESSOR_MAX.
	(mips_init_builtins): Ditto.

From-SVN: r100503
parent 3e3935a9
2005-06-02 Eric Christopher <echristo@redhat.com>
* config/mips/mips.h (processor_type): Remove PROCESSOR_DEFAULT,
add PROCESSOR_MAX.
(mips_rtx_cost_data): New datatype.
(MEMORY_MOVE_COST): Use data from structure.
(BRANCH_COST): Ditto.
(LOGICAL_OP_NON_SHORT_CIRCUIT): Define to zero.
* config/mips/mips.md (cpu): Rework for processor_type changes.
* config/mips/mips.c (mips_cost): New variable.
(DEFAULT_COSTS): Define.
(mips_rtx_cost_data): New.
(mips_rtx_costs): Use. Minor formatting changes. Use COSTS_N_INSNS
for NEG cost. Add support for FLOAT, UNSIGNED_FLOAT, FIX,
FLOAT_EXTEND, FLOAT_TRUNCATE, and SQRT.
(override_options): Set cost data.
(mips_register_move_cost): Formatting changes.
(bdesc_arrays): Use PROCESSOR_MAX.
(mips_init_builtins): Ditto.
2005-06-02 Diego Novillo <dnovillo@redhat.com>
PR 21765
......
......@@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */
the cpu attribute in the mips.md machine description. */
enum processor_type {
PROCESSOR_DEFAULT,
PROCESSOR_R3000,
PROCESSOR_4KC,
PROCESSOR_4KP,
PROCESSOR_5KC,
......@@ -40,7 +40,6 @@ enum processor_type {
PROCESSOR_24K,
PROCESSOR_24KX,
PROCESSOR_M4K,
PROCESSOR_R3000,
PROCESSOR_R3900,
PROCESSOR_R6000,
PROCESSOR_R4000,
......@@ -58,7 +57,25 @@ enum processor_type {
PROCESSOR_R8000,
PROCESSOR_R9000,
PROCESSOR_SB1,
PROCESSOR_SR71000
PROCESSOR_SR71000,
PROCESSOR_MAX
};
/* Costs of various operations on the different architectures. */
struct mips_rtx_cost_data
{
unsigned short fp_add;
unsigned short fp_mult_sf;
unsigned short fp_mult_df;
unsigned short fp_div_sf;
unsigned short fp_div_df;
unsigned short int_mult_si;
unsigned short int_mult_di;
unsigned short int_div_si;
unsigned short int_div_di;
unsigned short branch_cost;
unsigned short memory_latency;
};
/* Which ABI to use. ABI_32 (original 32, or o32), ABI_N32 (n32),
......@@ -108,6 +125,7 @@ extern int mips16_hard_float; /* mips16 without -msoft-float */
extern const struct mips_cpu_info mips_cpu_info_table[];
extern const struct mips_cpu_info *mips_arch_info;
extern const struct mips_cpu_info *mips_tune_info;
extern const struct mips_rtx_cost_data *mips_cost;
/* Macros to silence warnings about numbers being signed in traditional
C and unsigned in ISO C when compiled on 32-bit hosts. */
......@@ -2299,9 +2317,8 @@ typedef struct mips_args {
#define REGISTER_MOVE_COST(MODE, FROM, TO) \
mips_register_move_cost (MODE, FROM, TO)
/* ??? Fix this to be right for the R8000. */
#define MEMORY_MOVE_COST(MODE,CLASS,TO_P) \
(((TUNE_MIPS4000 || TUNE_MIPS6000) ? 6 : 4) \
(mips_cost->memory_latency \
+ memory_move_secondary_cost ((MODE), (CLASS), (TO_P)))
/* Define if copies to/from condition code registers should be avoided.
......@@ -2314,11 +2331,8 @@ typedef struct mips_args {
/* A C expression for the cost of a branch instruction. A value of
1 is the default; other values are interpreted relative to that. */
/* ??? Fix this to be right for the R8000. */
#define BRANCH_COST \
((! TARGET_MIPS16 \
&& (TUNE_MIPS4000 || TUNE_MIPS6000)) \
? 2 : 1)
#define BRANCH_COST mips_cost->branch_cost
#define LOGICAL_OP_NON_SHORT_CIRCUIT 0
/* If defined, modifies the length assigned to instruction INSN as a
function of the context in which it is used. LENGTH is an lvalue
......
......@@ -266,7 +266,7 @@
;; Attribute describing the processor. This attribute must match exactly
;; with the processor_type enumeration in mips.h.
(define_attr "cpu"
"default,4kc,4kp,5kc,20kc,24k,24kx,m4k,r3000,r3900,r6000,r4000,r4100,r4111,r4120,r4130,r4300,r4600,r4650,r5000,r5400,r5500,r7000,r8000,r9000,sb1,sr71000"
"r3000,4kc,4kp,5kc,20kc,24k,24kx,m4k,r3900,r6000,r4000,r4100,r4111,r4120,r4130,r4300,r4600,r4650,r5000,r5400,r5500,r7000,r8000,r9000,sb1,sr71000"
(const (symbol_ref "mips_tune")))
;; The type of hardware hazard associated with this instruction.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment