]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config/m32c/m32c.c
target.def (rtx_costs): Remove "code" param, add "mode".
[thirdparty/gcc.git] / gcc / config / m32c / m32c.c
index 3bf87c5eef681e6c18de8409d6fce4b9b7e7ddd2..40da261e44899d9d3db642892bebb8e855743700 100644 (file)
@@ -2222,9 +2222,11 @@ m32c_memory_move_cost (machine_mode mode ATTRIBUTE_UNUSED,
 #undef TARGET_RTX_COSTS
 #define TARGET_RTX_COSTS m32c_rtx_costs
 static bool
-m32c_rtx_costs (rtx x, int code, int outer_code, int opno ATTRIBUTE_UNUSED,
+m32c_rtx_costs (rtx x, machine_mode mode, int outer_code,
+               int opno ATTRIBUTE_UNUSED,
                int *total, bool speed ATTRIBUTE_UNUSED)
 {
+  int code = GET_CODE (x);
   switch (code)
     {
     case REG:
@@ -2292,7 +2294,7 @@ m32c_rtx_costs (rtx x, int code, int outer_code, int opno ATTRIBUTE_UNUSED,
 
     default:
       /* Reasonable default.  */
-      if (TARGET_A16 && GET_MODE(x) == SImode)
+      if (TARGET_A16 && mode == SImode)
        *total += COSTS_N_INSNS (2);
       break;
     }