summaryrefslogtreecommitdiff
path: root/gcc/config/tilegx/tilegx.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/tilegx/tilegx.c')
-rw-r--r--gcc/config/tilegx/tilegx.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/config/tilegx/tilegx.c b/gcc/config/tilegx/tilegx.c
index 68af9947985..8ceb41e4f50 100644
--- a/gcc/config/tilegx/tilegx.c
+++ b/gcc/config/tilegx/tilegx.c
@@ -551,9 +551,11 @@ tilegx_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
/* Implement TARGET_RTX_COSTS. */
static bool
-tilegx_rtx_costs (rtx x, int code, int outer_code, int opno, int *total,
- bool speed)
+tilegx_rtx_costs (rtx x, machine_mode mode, int outer_code, int opno,
+ int *total, bool speed)
{
+ int code = GET_CODE (x);
+
switch (code)
{
case CONST_INT:
@@ -620,9 +622,9 @@ tilegx_rtx_costs (rtx x, int code, int outer_code, int opno, int *total,
if (GET_CODE (XEXP (x, 0)) == MULT
&& cint_248_operand (XEXP (XEXP (x, 0), 1), VOIDmode))
{
- *total = (rtx_cost (XEXP (XEXP (x, 0), 0),
+ *total = (rtx_cost (XEXP (XEXP (x, 0), 0), mode,
(enum rtx_code) outer_code, opno, speed)
- + rtx_cost (XEXP (x, 1),
+ + rtx_cost (XEXP (x, 1), mode,
(enum rtx_code) outer_code, opno, speed)
+ COSTS_N_INSNS (1));
return true;