From b9c5315018a258574309d05df7f092868b508eae Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Tue, 18 Nov 2003 17:28:02 +0000 Subject: [PATCH] re PR middle-end/11821 (Operator implementation as a library call fails with constants) 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 | 6 ++++++ gcc/config/arm/arm.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c75cbe00e3b..2330d333a93 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-11-18 Roger Sayle + + 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 * cgraph.c (change_decl_assembler_name): Avoid bogus warnings. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 15143d9201c..c0a0cd84151 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -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)