Commit c81d6e2a by James E Wilson Committed by Jim Wilson

Add SB-1A support.

* config/mips/mips.md (cpu): Add sb1a.
* config/mips/sb1.md: Modify almost all patterns to accept sb1a in
addition to sb1.  Adjust comments to clarify SB-1A differences from
SB-1.
(ir_sb1a_load): New.  Modify bypasses to use it.
(ir_sb1a_simple_alu): Likewise.
* config/mips/mips.c (mips_cpu_info_table): Add sb1a.
(mips_rtx_cost_data): Add PROCESSOR_SB1A support.
(mips_issue_rate): Add PROCESSOR_SB1A.
(mips_multipass_dfa_lookahead): Use TUNE_SB1 instead of PROCESSOR_SB1.
* config/mips/mips.h (processor_type): Add PROCESSOR_SB1A.
(TARGET_SB1): Add PROCESSOR_SB1A check.
(TUNE_SB1): Likewise.
* config/mips/mips-protos.h (mips_store_data_bypass_p): New.
* config/mips/mips.c (mips_store_data_bypass_p): New.
* config/mips/sb1.md: Use mips_store_data_bypass_p instead of
store_data_bypass_p.

From-SVN: r115274
parent 1b13a490
2006-07-07 James E Wilson <wilson@specifix.com>
* config/mips/mips.md (cpu): Add sb1a.
* config/mips/sb1.md: Modify almost all patterns to accept sb1a in
addition to sb1. Adjust comments to clarify SB-1A differences from
SB-1.
(ir_sb1a_load): New. Modify bypasses to use it.
(ir_sb1a_simple_alu): Likewise.
* config/mips/mips.c (mips_cpu_info_table): Add sb1a.
(mips_rtx_cost_data): Add PROCESSOR_SB1A support.
(mips_issue_rate): Add PROCESSOR_SB1A.
(mips_multipass_dfa_lookahead): Use TUNE_SB1 instead of PROCESSOR_SB1.
* config/mips/mips.h (processor_type): Add PROCESSOR_SB1A.
(TARGET_SB1): Add PROCESSOR_SB1A check.
(TUNE_SB1): Likewise.
* config/mips/mips-protos.h (mips_store_data_bypass_p): New.
* config/mips/mips.c (mips_store_data_bypass_p): New.
* config/mips/sb1.md: Use mips_store_data_bypass_p instead of
store_data_bypass_p.
2006-07-08 Paul Brook <paul@codesourcery.com>
PR target/27991
......
......@@ -243,6 +243,7 @@ extern const char *mips_output_order_conditional_branch (rtx, rtx *, bool);
extern const char *mips_output_division (const char *, rtx *);
extern unsigned int mips_hard_regno_nregs (int, enum machine_mode);
extern bool mips_linked_madd_p (rtx, rtx);
extern int mips_store_data_bypass_p (rtx, rtx);
extern rtx mips_prefetch_cookie (rtx, rtx);
extern void irix_asm_output_align (FILE *, unsigned);
......
......@@ -759,6 +759,7 @@ const struct mips_cpu_info mips_cpu_info_table[] = {
{ "5kf", PROCESSOR_5KF, 64 },
{ "20kc", PROCESSOR_20KC, 64 },
{ "sb1", PROCESSOR_SB1, 64 },
{ "sb1a", PROCESSOR_SB1A, 64 },
{ "sr71000", PROCESSOR_SR71000, 64 },
/* End marker */
......@@ -1016,6 +1017,21 @@ static struct mips_rtx_cost_data const mips_rtx_cost_data[PROCESSOR_MAX] =
4 /* memory_latency */
},
{ /* SB1 */
/* These costs are the same as the SB-1A below. */
COSTS_N_INSNS (4), /* fp_add */
COSTS_N_INSNS (4), /* fp_mult_sf */
COSTS_N_INSNS (4), /* fp_mult_df */
COSTS_N_INSNS (24), /* fp_div_sf */
COSTS_N_INSNS (32), /* fp_div_df */
COSTS_N_INSNS (3), /* int_mult_si */
COSTS_N_INSNS (4), /* int_mult_di */
COSTS_N_INSNS (36), /* int_div_si */
COSTS_N_INSNS (68), /* int_div_di */
1, /* branch_cost */
4 /* memory_latency */
},
{ /* SB1-A */
/* These costs are the same as the SB-1 above. */
COSTS_N_INSNS (4), /* fp_add */
COSTS_N_INSNS (4), /* fp_mult_sf */
COSTS_N_INSNS (4), /* fp_mult_df */
......@@ -9904,6 +9920,7 @@ mips_issue_rate (void)
return 2;
case PROCESSOR_SB1:
case PROCESSOR_SB1A:
/* This is actually 4, but we get better performance if we claim 3.
This is partly because of unwanted speculative code motion with the
larger number, and partly because in most common cases we can't
......@@ -9922,11 +9939,25 @@ static int
mips_multipass_dfa_lookahead (void)
{
/* Can schedule up to 4 of the 6 function units in any one cycle. */
if (mips_tune == PROCESSOR_SB1)
if (TUNE_SB1)
return 4;
return 0;
}
/* Implements a store data bypass check. We need this because the cprestore
pattern is type store, but defined using an UNSPEC. This UNSPEC causes the
default routine to abort. We just return false for that case. */
/* ??? Should try to give a better result here than assuming false. */
int
mips_store_data_bypass_p (rtx out_insn, rtx in_insn)
{
if (GET_CODE (PATTERN (in_insn)) == UNSPEC_VOLATILE)
return false;
return ! store_data_bypass_p (out_insn, in_insn);
}
/* Given that we have an rtx of the form (prefetch ... WRITE LOCALITY),
return the first operand of the associated "pref" or "prefx" insn. */
......
......@@ -58,6 +58,7 @@ enum processor_type {
PROCESSOR_R8000,
PROCESSOR_R9000,
PROCESSOR_SB1,
PROCESSOR_SB1A,
PROCESSOR_SR71000,
PROCESSOR_MAX
};
......@@ -208,7 +209,8 @@ extern const struct mips_rtx_cost_data *mips_cost;
#define TARGET_MIPS5500 (mips_arch == PROCESSOR_R5500)
#define TARGET_MIPS7000 (mips_arch == PROCESSOR_R7000)
#define TARGET_MIPS9000 (mips_arch == PROCESSOR_R9000)
#define TARGET_SB1 (mips_arch == PROCESSOR_SB1)
#define TARGET_SB1 (mips_arch == PROCESSOR_SB1 \
|| mips_arch == PROCESSOR_SB1A)
#define TARGET_SR71K (mips_arch == PROCESSOR_SR71000)
/* Scheduling target defines. */
......@@ -223,7 +225,8 @@ extern const struct mips_rtx_cost_data *mips_cost;
#define TUNE_MIPS6000 (mips_tune == PROCESSOR_R6000)
#define TUNE_MIPS7000 (mips_tune == PROCESSOR_R7000)
#define TUNE_MIPS9000 (mips_tune == PROCESSOR_R9000)
#define TUNE_SB1 (mips_tune == PROCESSOR_SB1)
#define TUNE_SB1 (mips_tune == PROCESSOR_SB1 \
|| mips_tune == PROCESSOR_SB1A)
/* True if the pre-reload scheduler should try to create chains of
multiply-add or multiply-subtract instructions. For example,
......
......@@ -340,7 +340,7 @@
;; Attribute describing the processor. This attribute must match exactly
;; with the processor_type enumeration in mips.h.
(define_attr "cpu"
"r3000,4kc,4kp,5kc,5kf,20kc,24k,24kx,m4k,r3900,r6000,r4000,r4100,r4111,r4120,r4130,r4300,r4600,r4650,r5000,r5400,r5500,r7000,r8000,r9000,sb1,sr71000"
"r3000,4kc,4kp,5kc,5kf,20kc,24k,24kx,m4k,r3900,r6000,r4000,r4100,r4111,r4120,r4130,r4300,r4600,r4650,r5000,r5400,r5500,r7000,r8000,r9000,sb1,sb1a,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