aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSteve Ellcey <sje@cup.hp.com>2006-11-09 23:48:55 +0000
committerSteve Ellcey <sje@gcc.gnu.org>2006-11-09 23:48:55 +0000
commitbdbba3c27ea90684291579efcf27d9f346bd1db7 (patch)
tree62e6282ea4f8a36429c6218e0a201ef1c09565eb /gcc
parent012019922e6fed9b526e0c9cc34ec15250b73939 (diff)
downloadgcc-bdbba3c27ea90684291579efcf27d9f346bd1db7.zip
gcc-bdbba3c27ea90684291579efcf27d9f346bd1db7.tar.gz
gcc-bdbba3c27ea90684291579efcf27d9f346bd1db7.tar.bz2
ia64.c (ia64_hpux_init_libfuncs): Use HP-UX millicode routines for integer division.
* config/ia64/ia64.c (ia64_hpux_init_libfuncs): Use HP-UX millicode routines for integer division. From-SVN: r118632
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/ia64/ia64.c16
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bff4ace..36750a0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2006-11-09 Steve Ellcey <sje@cup.hp.com>
+
+ * config/ia64/ia64.c (ia64_hpux_init_libfuncs): Use HP-UX millicode
+ routines for integer division.
+
2006-11-09 Daniel Jacobowitz <dan@codesourcery.com>
* config/arm/t-linux (LIBGCC2_DEBUG_CFLAGS): Delete.
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 418f9a1..2867e6f 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -9272,6 +9272,22 @@ ia64_hpux_init_libfuncs (void)
{
ia64_init_libfuncs ();
+ /* The HP SI millicode division and mod functions expect DI arguments.
+ By turning them off completely we avoid using both libgcc and the
+ non-standard millicode routines and use the HP DI millicode routines
+ instead. */
+
+ set_optab_libfunc (sdiv_optab, SImode, 0);
+ set_optab_libfunc (udiv_optab, SImode, 0);
+ set_optab_libfunc (smod_optab, SImode, 0);
+ set_optab_libfunc (umod_optab, SImode, 0);
+
+ set_optab_libfunc (sdiv_optab, DImode, "__milli_divI");
+ set_optab_libfunc (udiv_optab, DImode, "__milli_divU");
+ set_optab_libfunc (smod_optab, DImode, "__milli_remI");
+ set_optab_libfunc (umod_optab, DImode, "__milli_remU");
+
+ /* HP-UX libc has TF min/max/abs routines in it. */
set_optab_libfunc (smin_optab, TFmode, "_U_Qfmin");
set_optab_libfunc (smax_optab, TFmode, "_U_Qfmax");
set_optab_libfunc (abs_optab, TFmode, "_U_Qfabs");