+2002-02-14 Kazu Hirata <kazu@hxi.com>
+
+ * config/h8300/h8300-protos.h: Update the prototype for
+ const_costs.
+ * config/h8300/h8300.c (const_costs): Treat SET as a little
+ more expensive operation.
+ * config/h8300/h8300.h (DEFAULT_RTX_COSTS): Update the
+ reference to const_costs.
+
2002-02-14 Hans-Peter Nilsson <hp@axis.com>
* config.gcc (c4x-*-rtems*): Fix typo in tm_file setting.
extern const char *emit_a_rotate PARAMS ((enum rtx_code, rtx *));
extern const char *output_simode_bld PARAMS ((int, rtx[]));
extern void print_operand_address PARAMS ((FILE *, rtx));
-extern int const_costs PARAMS ((rtx, enum rtx_code));
+extern int const_costs PARAMS ((rtx, enum rtx_code, enum rtx_code));
extern void print_operand PARAMS ((FILE *, rtx, int));
extern void final_prescan_insn PARAMS ((rtx, rtx *, int));
extern int do_movsi PARAMS ((rtx[]));
/* Return the cost of the rtx R with code CODE. */
int
-const_costs (r, c)
+const_costs (r, c, outer_code)
rtx r;
enum rtx_code c;
+ enum rtx_code outer_code;
{
switch (c)
{
switch (INTVAL (r))
{
case 0:
+ return 0;
case 1:
case 2:
case -1:
case -2:
- return 0;
+ return 0 + (outer_code == SET);
case 4:
case -4:
if (TARGET_H8300H || TARGET_H8300S)
- return 0;
+ return 0 + (outer_code == SET);
else
return 1;
default:
return it with a return statement. Otherwise, break from the switch. */
#define DEFAULT_RTX_COSTS(RTX, CODE, OUTER_CODE) \
- return (const_costs (RTX, CODE));
+ return (const_costs (RTX, CODE, OUTER_CODE));
#define BRANCH_COST 0