aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/mips')
-rw-r--r--gcc/config/mips/mips.c35
-rw-r--r--gcc/config/mips/mips.h2
-rw-r--r--gcc/config/mips/sdemtk.h4
3 files changed, 21 insertions, 20 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index ca727ad..8e3cdcf 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -3312,7 +3312,7 @@ mips_binary_cost (rtx x, int single_cost, int double_cost)
else
cost = single_cost;
return (cost
- + rtx_cost (XEXP (x, 0), 0, !optimize_size)
+ + rtx_cost (XEXP (x, 0), SET, !optimize_size)
+ rtx_cost (XEXP (x, 1), GET_CODE (x), !optimize_size));
}
@@ -3531,7 +3531,7 @@ mips_rtx_costs (rtx x, int code, int outer_code, int *total,
&& UINTVAL (XEXP (x, 1)) == 0xffffffff)
{
*total = (mips_zero_extend_cost (mode, XEXP (x, 0))
- + rtx_cost (XEXP (x, 0), 0, speed));
+ + rtx_cost (XEXP (x, 0), SET, speed));
return true;
}
/* Fall through. */
@@ -3563,7 +3563,7 @@ mips_rtx_costs (rtx x, int code, int outer_code, int *total,
case LO_SUM:
/* Low-part immediates need an extended MIPS16 instruction. */
*total = (COSTS_N_INSNS (TARGET_MIPS16 ? 2 : 1)
- + rtx_cost (XEXP (x, 0), 0, speed));
+ + rtx_cost (XEXP (x, 0), SET, speed));
return true;
case LT:
@@ -3603,17 +3603,17 @@ mips_rtx_costs (rtx x, int code, int outer_code, int *total,
if (GET_CODE (op0) == MULT && GET_CODE (XEXP (op0, 0)) == NEG)
{
*total = (mips_fp_mult_cost (mode)
- + rtx_cost (XEXP (XEXP (op0, 0), 0), 0, speed)
- + rtx_cost (XEXP (op0, 1), 0, speed)
- + rtx_cost (op1, 0, speed));
+ + rtx_cost (XEXP (XEXP (op0, 0), 0), SET, speed)
+ + rtx_cost (XEXP (op0, 1), SET, speed)
+ + rtx_cost (op1, SET, speed));
return true;
}
if (GET_CODE (op1) == MULT)
{
*total = (mips_fp_mult_cost (mode)
- + rtx_cost (op0, 0, speed)
- + rtx_cost (XEXP (op1, 0), 0, speed)
- + rtx_cost (XEXP (op1, 1), 0, speed));
+ + rtx_cost (op0, SET, speed)
+ + rtx_cost (XEXP (op1, 0), SET, speed)
+ + rtx_cost (XEXP (op1, 1), SET, speed));
return true;
}
}
@@ -3654,9 +3654,9 @@ mips_rtx_costs (rtx x, int code, int outer_code, int *total,
&& GET_CODE (XEXP (op, 0)) == MULT)
{
*total = (mips_fp_mult_cost (mode)
- + rtx_cost (XEXP (XEXP (op, 0), 0), 0, speed)
- + rtx_cost (XEXP (XEXP (op, 0), 1), 0, speed)
- + rtx_cost (XEXP (op, 1), 0, speed));
+ + rtx_cost (XEXP (XEXP (op, 0), 0), SET, speed)
+ + rtx_cost (XEXP (XEXP (op, 0), 1), SET, speed)
+ + rtx_cost (XEXP (op, 1), SET, speed));
return true;
}
}
@@ -3694,9 +3694,10 @@ mips_rtx_costs (rtx x, int code, int outer_code, int *total,
if (outer_code == SQRT || GET_CODE (XEXP (x, 1)) == SQRT)
/* An rsqrt<mode>a or rsqrt<mode>b pattern. Count the
division as being free. */
- *total = rtx_cost (XEXP (x, 1), 0, speed);
+ *total = rtx_cost (XEXP (x, 1), SET, speed);
else
- *total = mips_fp_div_cost (mode) + rtx_cost (XEXP (x, 1), 0, speed);
+ *total = (mips_fp_div_cost (mode)
+ + rtx_cost (XEXP (x, 1), SET, speed));
return true;
}
/* Fall through. */
@@ -3724,7 +3725,7 @@ mips_rtx_costs (rtx x, int code, int outer_code, int *total,
&& CONST_INT_P (XEXP (x, 1))
&& exact_log2 (INTVAL (XEXP (x, 1))) >= 0)
{
- *total = COSTS_N_INSNS (2) + rtx_cost (XEXP (x, 0), 0, speed);
+ *total = COSTS_N_INSNS (2) + rtx_cost (XEXP (x, 0), SET, speed);
return true;
}
*total = COSTS_N_INSNS (mips_idiv_insns ());
@@ -14465,8 +14466,8 @@ mips_override_options (void)
/* Set up mips_hard_regno_mode_ok. */
for (mode = 0; mode < MAX_MACHINE_MODE; mode++)
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
- mips_hard_regno_mode_ok[(int)mode][regno]
- = mips_hard_regno_mode_ok_p (regno, mode);
+ mips_hard_regno_mode_ok[mode][regno]
+ = mips_hard_regno_mode_ok_p (regno, (enum machine_mode) mode);
/* Function to allocate machine-dependent function status. */
init_machine_status = &mips_init_machine_status;
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index cd6f1e5..30faa19 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -2441,7 +2441,7 @@ typedef struct mips_args {
/* Flush both caches. We need to flush the data cache in case \
the system has a write-back cache. */ \
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, mips_cache_flush_func), \
- 0, VOIDmode, 3, ADDR, Pmode, SIZE, Pmode, \
+ LCT_NORMAL, VOIDmode, 3, ADDR, Pmode, SIZE, Pmode, \
GEN_INT (3), TYPE_MODE (integer_type_node))
/* A C statement to initialize the variable parts of a trampoline.
diff --git a/gcc/config/mips/sdemtk.h b/gcc/config/mips/sdemtk.h
index 3e4e58f..adaaa25 100644
--- a/gcc/config/mips/sdemtk.h
+++ b/gcc/config/mips/sdemtk.h
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler.
MIPS SDE version, for use with the SDE C library rather than newlib.
- Copyright (C) 2007, 2008
+ Copyright (C) 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -86,7 +86,7 @@ extern void mips_sync_icache (void *beg, unsigned long len);
#undef MIPS_ICACHE_SYNC
#define MIPS_ICACHE_SYNC(ADDR, SIZE) \
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, mips_cache_flush_func), \
- 0, VOIDmode, 2, ADDR, Pmode, \
+ LCT_NORMAL, VOIDmode, 2, ADDR, Pmode, \
SIZE, TYPE_MODE (sizetype))
/* This version of _mcount does not pop 2 words from the stack. */