]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/11821 (Operator implementation as a library call fails with constants)
authorRoger Sayle <roger@eyesopen.com>
Tue, 18 Nov 2003 17:28:02 +0000 (17:28 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Tue, 18 Nov 2003 17:28:02 +0000 (17:28 +0000)
PR middle-end/11821
* config/arm/arm.c (arm_rtx_costs_1): Improve estimate of the code
size for calls to libgcc's div & mod subroutines when using -Os.

From-SVN: r73706

gcc/ChangeLog
gcc/config/arm/arm.c

index c75cbe00e3bd4d82924b8a0aeb2669988f132080..2330d333a93e2e2135b19f0ae063e8cdf8ca6f8f 100644 (file)
@@ -1,3 +1,9 @@
+2003-11-18  Roger Sayle  <roger@eyesopen.com>
+
+       PR middle-end/11821
+       * config/arm/arm.c (arm_rtx_costs_1): Improve estimate of the code
+       size for calls to libgcc's div & mod subroutines when using -Os.
+
 2003-11-18  Jan Hubicka  <jh@suse.cz>
 
        * cgraph.c (change_decl_assembler_name): Avoid bogus warnings.
index 15143d9201c95ac0e9e7c8718820bb68112e94fd..c0a0cd84151c7834770ff3cf9509377188d6b831 100644 (file)
@@ -3210,7 +3210,9 @@ arm_rtx_costs_1 (rtx x, enum rtx_code code, enum rtx_code outer)
 
     case DIV:
     case MOD:
-      return 100;
+    case UDIV:
+    case UMOD:
+      return optimize_size ? COSTS_N_INSNS (2) : 100;
 
     case ROTATE:
       if (mode == SImode && GET_CODE (XEXP (x, 1)) == REG)