aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Ellcey <sje@cup.hp.com>2004-03-11 19:21:19 +0000
committerSteve Ellcey <sje@gcc.gnu.org>2004-03-11 19:21:19 +0000
commit1f7aa7cdd65d774a0735ca485546510f907ec5ef (patch)
treea5bfca7dd411785914affdd4c2c608e241b68dc8
parentc6feb69790d5ed80fcd8697693ce50146269ba4c (diff)
downloadgcc-1f7aa7cdd65d774a0735ca485546510f907ec5ef.zip
gcc-1f7aa7cdd65d774a0735ca485546510f907ec5ef.tar.gz
gcc-1f7aa7cdd65d774a0735ca485546510f907ec5ef.tar.bz2
hpux.h (TARGET_INIT_LIBFUNCS): Add undef.
* config/ia64/hpux.h (TARGET_INIT_LIBFUNCS): Add undef. * config/ia64/ia64.h (TARGET_INIT_LIBFUNCS): Add define. * config/ia64/ia64.c (ia64_init_libfuncs): New. (ia64_hpux_init_libfuncs): Add call to ia64_init_libfuncs. From-SVN: r79339
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/ia64/hpux.h1
-rw-r--r--gcc/config/ia64/ia64.c16
-rw-r--r--gcc/config/ia64/ia64.h4
4 files changed, 28 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dcaa0b6..10a7417 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2004-03-11 Steve Ellcey <sje@cup.hp.com>
+
+ * config/ia64/hpux.h (TARGET_INIT_LIBFUNCS): Add undef.
+ * config/ia64/ia64.h (TARGET_INIT_LIBFUNCS): Add define.
+ * config/ia64/ia64.c (ia64_init_libfuncs): New.
+ (ia64_hpux_init_libfuncs): Add call to ia64_init_libfuncs.
+
2004-03-11 Roger Sayle <roger@eyesopen.com>
* fold-const.c (negate_expr_p) <RSHIFT_EXPR>: We can optimize
diff --git a/gcc/config/ia64/hpux.h b/gcc/config/ia64/hpux.h
index 97cdd3f..877bb5d 100644
--- a/gcc/config/ia64/hpux.h
+++ b/gcc/config/ia64/hpux.h
@@ -202,6 +202,7 @@ do { \
#undef TARGET_C99_FUNCTIONS
#define TARGET_C99_FUNCTIONS 1
+#undef TARGET_INIT_LIBFUNCS
#define TARGET_INIT_LIBFUNCS ia64_hpux_init_libfuncs
#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) ((MODE) == TFmode)
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index d7513ff..6b90aa8 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -261,6 +261,8 @@ static void ia64_hpux_add_extern_decl (tree decl)
ATTRIBUTE_UNUSED;
static void ia64_hpux_file_end (void)
ATTRIBUTE_UNUSED;
+static void ia64_init_libfuncs (void)
+ ATTRIBUTE_UNUSED;
static void ia64_hpux_init_libfuncs (void)
ATTRIBUTE_UNUSED;
static void ia64_vms_init_libfuncs (void)
@@ -8747,11 +8749,25 @@ ia64_hpux_file_end (void)
extern_func_head = 0;
}
+/* Set SImode div/mod functions, init_integral_libfuncs only initializes
+ modes of word_mode and larger. */
+
+static void
+ia64_init_libfuncs (void)
+{
+ set_optab_libfunc (sdiv_optab, SImode, "__divsi3");
+ set_optab_libfunc (udiv_optab, SImode, "__udivsi3");
+ set_optab_libfunc (smod_optab, SImode, "__modsi3");
+ set_optab_libfunc (umod_optab, SImode, "__umodsi3");
+}
+
/* Rename all the TFmode libfuncs using the HPUX conventions. */
static void
ia64_hpux_init_libfuncs (void)
{
+ ia64_init_libfuncs ();
+
set_optab_libfunc (add_optab, TFmode, "_U_Qfadd");
set_optab_libfunc (sub_optab, TFmode, "_U_Qfsub");
set_optab_libfunc (smul_optab, TFmode, "_U_Qfmpy");
diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
index 69a2954..29f78c4 100644
--- a/gcc/config/ia64/ia64.h
+++ b/gcc/config/ia64/ia64.h
@@ -2381,6 +2381,10 @@ enum fetchop_code {
#undef PROFILE_BEFORE_PROLOGUE
#define PROFILE_BEFORE_PROLOGUE 1
+/* Initialize library function table. */
+#undef TARGET_INIT_LIBFUNCS
+#define TARGET_INIT_LIBFUNCS ia64_init_libfuncs
+
/* Switch on code for querying unit reservations. */