Commit 508ea1c5 by Kazu Hirata Committed by Kazu Hirata

* config/sh/sh.c: Convert to ISO-C.

From-SVN: r78645
parent 4217f24b
2004-02-28 Kazu Hirata <kazu@cs.umass.edu>
* config/sh/sh.c: Convert to ISO-C.
2004-02-28 Andrew Pinski <pinskia@physics.uc.edu> 2004-02-28 Andrew Pinski <pinskia@physics.uc.edu>
* c-typeck.c (tagged_types_tu_compatible_p): Fix pasto in * c-typeck.c (tagged_types_tu_compatible_p): Fix pasto in
......
...@@ -8361,9 +8361,7 @@ sh_issue_rate(void) ...@@ -8361,9 +8361,7 @@ sh_issue_rate(void)
/* Get weight for mode for a set x. */ /* Get weight for mode for a set x. */
static short static short
find_set_regmode_weight (x, mode) find_set_regmode_weight (rtx x, enum machine_mode mode)
rtx x;
enum machine_mode mode;
{ {
if (GET_CODE (x) == CLOBBER && register_operand (SET_DEST (x), mode)) if (GET_CODE (x) == CLOBBER && register_operand (SET_DEST (x), mode))
return 1; return 1;
...@@ -8383,9 +8381,7 @@ find_set_regmode_weight (x, mode) ...@@ -8383,9 +8381,7 @@ find_set_regmode_weight (x, mode)
/* Get regmode weight for insn. */ /* Get regmode weight for insn. */
static short static short
find_insn_regmode_weight (insn, mode) find_insn_regmode_weight (rtx insn, enum machine_mode mode)
rtx insn;
enum machine_mode mode;
{ {
short reg_weight = 0; short reg_weight = 0;
rtx x; rtx x;
...@@ -8417,9 +8413,7 @@ find_insn_regmode_weight (insn, mode) ...@@ -8417,9 +8413,7 @@ find_insn_regmode_weight (insn, mode)
/* Calculate regmode weights for all insns of a basic block. */ /* Calculate regmode weights for all insns of a basic block. */
static void static void
find_regmode_weight (b, mode) find_regmode_weight (int b, enum machine_mode mode)
int b;
enum machine_mode mode;
{ {
rtx insn, next_tail, head, tail; rtx insn, next_tail, head, tail;
...@@ -8443,9 +8437,7 @@ find_regmode_weight (b, mode) ...@@ -8443,9 +8437,7 @@ find_regmode_weight (b, mode)
/* Comparison function for ready queue sorting. */ /* Comparison function for ready queue sorting. */
static int static int
rank_for_reorder (x, y) rank_for_reorder (const void *x, const void *y)
const void *x;
const void *y;
{ {
rtx tmp = *(const rtx *) y; rtx tmp = *(const rtx *) y;
rtx tmp2 = *(const rtx *) x; rtx tmp2 = *(const rtx *) x;
...@@ -8462,9 +8454,7 @@ rank_for_reorder (x, y) ...@@ -8462,9 +8454,7 @@ rank_for_reorder (x, y)
/* Resort the array A in which only element at index N may be out of order. */ /* Resort the array A in which only element at index N may be out of order. */
static void static void
swap_reorder (a, n) swap_reorder (rtx *a, int n)
rtx *a;
int n;
{ {
rtx insn = a[n - 1]; rtx insn = a[n - 1];
int i = n - 2; int i = n - 2;
...@@ -8487,19 +8477,16 @@ while (0) ...@@ -8487,19 +8477,16 @@ while (0)
/* Sort the ready list READY by ascending priority, using the SCHED_REORDER /* Sort the ready list READY by ascending priority, using the SCHED_REORDER
macro. */ macro. */
static void static void
ready_reorder (ready, nready) ready_reorder (rtx *ready, int nready)
rtx *ready;
int nready;
{ {
SCHED_REORDER (ready, nready); SCHED_REORDER (ready, nready);
} }
/* Calculate regmode weights for all insns of all basic block. */ /* Calculate regmode weights for all insns of all basic block. */
static void static void
sh_md_init_global (dump, verbose, old_max_uid) sh_md_init_global (FILE *dump ATTRIBUTE_UNUSED,
FILE *dump ATTRIBUTE_UNUSED; int verbose ATTRIBUTE_UNUSED,
int verbose ATTRIBUTE_UNUSED; int old_max_uid)
int old_max_uid;
{ {
basic_block b; basic_block b;
...@@ -8519,9 +8506,8 @@ sh_md_init_global (dump, verbose, old_max_uid) ...@@ -8519,9 +8506,8 @@ sh_md_init_global (dump, verbose, old_max_uid)
/* Cleanup. */ /* Cleanup. */
static void static void
sh_md_finish_global (dump, verbose) sh_md_finish_global (FILE *dump ATTRIBUTE_UNUSED,
FILE *dump ATTRIBUTE_UNUSED; int verbose ATTRIBUTE_UNUSED)
int verbose ATTRIBUTE_UNUSED;
{ {
if (regmode_weight[0]) if (regmode_weight[0])
{ {
...@@ -8538,11 +8524,10 @@ sh_md_finish_global (dump, verbose) ...@@ -8538,11 +8524,10 @@ sh_md_finish_global (dump, verbose)
/* Cache the can_issue_more so that we can return it from reorder2. Also, /* Cache the can_issue_more so that we can return it from reorder2. Also,
keep count of register pressures on SImode and SFmode. */ keep count of register pressures on SImode and SFmode. */
static int static int
sh_variable_issue (dump, sched_verbose, insn, can_issue_more) sh_variable_issue (FILE *dump ATTRIBUTE_UNUSED,
FILE *dump ATTRIBUTE_UNUSED; int sched_verbose ATTRIBUTE_UNUSED,
int sched_verbose ATTRIBUTE_UNUSED; rtx insn,
rtx insn; int can_issue_more)
int can_issue_more;
{ {
if (GET_CODE (PATTERN (insn)) != USE if (GET_CODE (PATTERN (insn)) != USE
&& GET_CODE (PATTERN (insn)) != CLOBBER) && GET_CODE (PATTERN (insn)) != CLOBBER)
...@@ -8560,10 +8545,9 @@ sh_variable_issue (dump, sched_verbose, insn, can_issue_more) ...@@ -8560,10 +8545,9 @@ sh_variable_issue (dump, sched_verbose, insn, can_issue_more)
} }
static void static void
sh_md_init (dump, verbose, veclen) sh_md_init (FILE *dump ATTRIBUTE_UNUSED,
FILE *dump ATTRIBUTE_UNUSED; int verbose ATTRIBUTE_UNUSED,
int verbose ATTRIBUTE_UNUSED; int veclen ATTRIBUTE_UNUSED)
int veclen ATTRIBUTE_UNUSED;
{ {
CURR_REGMODE_PRESSURE (SImode) = 0; CURR_REGMODE_PRESSURE (SImode) = 0;
CURR_REGMODE_PRESSURE (SFmode) = 0; CURR_REGMODE_PRESSURE (SFmode) = 0;
...@@ -8580,8 +8564,7 @@ sh_md_init (dump, verbose, veclen) ...@@ -8580,8 +8564,7 @@ sh_md_init (dump, verbose, veclen)
/* Return true if the pressure is high for MODE. */ /* Return true if the pressure is high for MODE. */
static short static short
high_pressure (mode) high_pressure (enum machine_mode mode)
enum machine_mode mode;
{ {
/* Pressure on register r0 can lead to spill failures. so avoid sched1 for /* Pressure on register r0 can lead to spill failures. so avoid sched1 for
functions that already have high pressure on r0. */ functions that already have high pressure on r0. */
...@@ -8597,12 +8580,11 @@ high_pressure (mode) ...@@ -8597,12 +8580,11 @@ high_pressure (mode)
/* Reorder ready queue if register pressure is high. */ /* Reorder ready queue if register pressure is high. */
static int static int
sh_reorder (dump, sched_verbose, ready, n_readyp, clock_var) sh_reorder (FILE *dump ATTRIBUTE_UNUSED,
FILE *dump ATTRIBUTE_UNUSED; int sched_verbose ATTRIBUTE_UNUSED,
int sched_verbose ATTRIBUTE_UNUSED; rtx *ready,
rtx *ready; int *n_readyp,
int *n_readyp; int clock_var ATTRIBUTE_UNUSED)
int clock_var ATTRIBUTE_UNUSED;
{ {
if (reload_completed) if (reload_completed)
return sh_issue_rate (); return sh_issue_rate ();
...@@ -8617,12 +8599,11 @@ sh_reorder (dump, sched_verbose, ready, n_readyp, clock_var) ...@@ -8617,12 +8599,11 @@ sh_reorder (dump, sched_verbose, ready, n_readyp, clock_var)
/* Skip cycles if the current register pressure is high. */ /* Skip cycles if the current register pressure is high. */
static int static int
sh_reorder2 (dump, sched_verbose, ready, n_readyp, clock_var) sh_reorder2 (FILE *dump ATTRIBUTE_UNUSED,
FILE *dump ATTRIBUTE_UNUSED; int sched_verbose ATTRIBUTE_UNUSED,
int sched_verbose ATTRIBUTE_UNUSED; rtx *ready ATTRIBUTE_UNUSED,
rtx *ready ATTRIBUTE_UNUSED; int *n_readyp ATTRIBUTE_UNUSED,
int *n_readyp ATTRIBUTE_UNUSED; int clock_var ATTRIBUTE_UNUSED)
int clock_var ATTRIBUTE_UNUSED;
{ {
if (reload_completed) if (reload_completed)
return cached_can_issue_more; return cached_can_issue_more;
...@@ -8642,14 +8623,12 @@ sh_reorder2 (dump, sched_verbose, ready, n_readyp, clock_var) ...@@ -8642,14 +8623,12 @@ sh_reorder2 (dump, sched_verbose, ready, n_readyp, clock_var)
#define MAX_SKIPS 8 #define MAX_SKIPS 8
static int static int
sh_dfa_new_cycle (sched_dump, sched_verbose, insn, last_clock_var, sh_dfa_new_cycle (FILE *sched_dump ATTRIBUTE_UNUSED,
clock_var, sort_p) int sched_verbose ATTRIBUTE_UNUSED,
FILE *sched_dump ATTRIBUTE_UNUSED; rtx insn ATTRIBUTE_UNUSED,
int sched_verbose ATTRIBUTE_UNUSED; int last_clock_var,
rtx insn ATTRIBUTE_UNUSED; int clock_var,
int last_clock_var; int *sort_p)
int clock_var;
int *sort_p;
{ {
if (reload_completed) if (reload_completed)
return 0; return 0;
...@@ -8696,8 +8675,7 @@ sh_optimize_target_register_callee_saved (bool after_prologue_epilogue_gen) ...@@ -8696,8 +8675,7 @@ sh_optimize_target_register_callee_saved (bool after_prologue_epilogue_gen)
} }
static bool static bool
sh_ms_bitfield_layout_p (record_type) sh_ms_bitfield_layout_p (tree record_type ATTRIBUTE_UNUSED)
tree record_type ATTRIBUTE_UNUSED;
{ {
return (TARGET_SH5 || TARGET_HITACHI || sh_attr_renesas_p (record_type)); return (TARGET_SH5 || TARGET_HITACHI || sh_attr_renesas_p (record_type));
} }
......
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