arm.c (arm_init_libfuncs): Use __aeabi_idiv and __aeabi_uidiv.
authorDaniel Jacobowitz <dan@codesourcery.com>
Fri, 4 Nov 2005 15:29:01 +0000 (15:29 +0000)
committerDaniel Jacobowitz <drow@gcc.gnu.org>
Fri, 4 Nov 2005 15:29:01 +0000 (15:29 +0000)
* config/arm/arm.c (arm_init_libfuncs): Use __aeabi_idiv and
__aeabi_uidiv.

From-SVN: r106492

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

index bb6f9b762d2dad0fe9c92b174a86e932a15b8fb3..021be34bcff25fd7bba104a517c2fa8a4644d32b 100644 (file)
@@ -1,3 +1,8 @@
+2005-11-04  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * config/arm/arm.c (arm_init_libfuncs): Use __aeabi_idiv and
+       __aeabi_uidiv.
+
 2005-11-04  Mark Mitchell  <mark@codesourcery.com>
            Daniel Jacobowitz  <dan@codesourcery.com>
 
index 061c33abfcc0191dc116171d371250c295c47371..0433db12ae59f621a0dc0830701b85165fc902cb 100644 (file)
@@ -817,8 +817,11 @@ arm_init_libfuncs (void)
      routines.  */
   set_optab_libfunc (sdiv_optab, DImode, "__aeabi_ldivmod");
   set_optab_libfunc (udiv_optab, DImode, "__aeabi_uldivmod");
-  set_optab_libfunc (sdiv_optab, SImode, "__aeabi_idivmod");
-  set_optab_libfunc (udiv_optab, SImode, "__aeabi_uidivmod");
+
+  /* For SImode division the ABI provides div-without-mod routines,
+     which are faster.  */
+  set_optab_libfunc (sdiv_optab, SImode, "__aeabi_idiv");
+  set_optab_libfunc (udiv_optab, SImode, "__aeabi_uidiv");
 
   /* We don't have mod libcalls.  Fortunately gcc knows how to use the
      divmod libcalls instead.  */