aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/mips')
-rw-r--r--gcc/config/mips/mips.c22
-rw-r--r--gcc/config/mips/mips.h10
2 files changed, 22 insertions, 10 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index d9cdcf5..268c7f4 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -126,6 +126,7 @@ static int iris_section_align_entry_eq PARAMS ((const PTR, const PTR));
static hashval_t iris_section_align_entry_hash PARAMS ((const PTR));
static int iris6_section_align_1 PARAMS ((void **, void *));
#endif
+static int mips_adjust_cost PARAMS ((rtx, rtx, rtx, int));
/* Global variables for machine-dependent things. */
@@ -455,6 +456,9 @@ enum reg_class mips_char_to_class[256] =
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE mips_output_function_epilogue
+#undef TARGET_SCHED_ADJUST_COST
+#define TARGET_SCHED_ADJUST_COST mips_adjust_cost
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* Return truth value of whether OP can be used as an operands
@@ -9743,6 +9747,23 @@ mips_parse_cpu (cpu_string)
return cpu;
}
+/* Adjust the cost of INSN based on the relationship between INSN that
+ is dependent on DEP_INSN through the dependence LINK. The default
+ is to make no adjustment to COST.
+
+ On the MIPS, ignore the cost of anti- and output-dependencies. */
+static int
+mips_adjust_cost (insn, link, dep, cost)
+ rtx insn ATTRIBUTE_UNUSED;
+ rtx link;
+ rtx dep ATTRIBUTE_UNUSED;
+ int cost;
+{
+ if (REG_NOTE_KIND (link) != 0)
+ return 0; /* Anti or output dependence. */
+ return cost;
+}
+
/* Cover function for UNIQUE_SECTION. */
void
@@ -9815,6 +9836,7 @@ mips_unique_section (decl, reloc)
DECL_SECTION_NAME (decl) = build_string (len, string);
}
+
#ifdef TARGET_IRIX6
/* Output assembly to switch to section NAME with attribute FLAGS. */
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index a3500ee..e09fb12 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -3688,16 +3688,6 @@ while (0)
&& (TUNE_MIPS4000 || TUNE_MIPS6000)) \
? 2 : 1)
-/* A C statement (sans semicolon) to update the integer variable COST
- based on the relationship between INSN that is dependent on
- DEP_INSN through the dependence LINK. The default is to make no
- adjustment to COST. On the MIPS, ignore the cost of anti- and
- output-dependencies. */
-
-#define ADJUST_COST(INSN,LINK,DEP_INSN,COST) \
- if (REG_NOTE_KIND (LINK) != 0) \
- (COST) = 0; /* Anti or output dependence. */
-
/* If defined, modifies the length assigned to instruction INSN as a
function of the context in which it is used. LENGTH is an lvalue
that contains the initially computed length of the insn and should