aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/pa
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>2000-02-22 08:40:16 +0000
committerJeff Law <law@gcc.gnu.org>2000-02-22 01:40:16 -0700
commit24e971f6670149edee2f47487e03ef48cd559eb7 (patch)
tree86c82469c459e36867b51d5fe897ededd17724bb /gcc/config/pa
parentcab1f180126204494330d58a4059ccd3f1265861 (diff)
downloadgcc-24e971f6670149edee2f47487e03ef48cd559eb7.zip
gcc-24e971f6670149edee2f47487e03ef48cd559eb7.tar.gz
gcc-24e971f6670149edee2f47487e03ef48cd559eb7.tar.bz2
pa.h (FUNCTION_ARG_PASS_BY_REFERENCE): Handle pass-by-reference for arguments with a mode, but no type.
* pa.h (FUNCTION_ARG_PASS_BY_REFERENCE): Handle pass-by-reference for arguments with a mode, but no type. (FUNCTION_ARG_CALLEE_COPIES): Similarly. * t-pa (LIB2FUNCS_EXTRA): Add quadlib.asm. * pa/long_double.h: New file. * configure.in (hpux10, hpux11 configurations): hpux10 and hpux11 both have 128bit wide long doubles. * configure: Rebuilt. From-SVN: r32101
Diffstat (limited to 'gcc/config/pa')
-rw-r--r--gcc/config/pa/long_double.h106
-rw-r--r--gcc/config/pa/pa.h6
-rw-r--r--gcc/config/pa/t-pa6
3 files changed, 115 insertions, 3 deletions
diff --git a/gcc/config/pa/long_double.h b/gcc/config/pa/long_double.h
new file mode 100644
index 0000000..4978855
--- /dev/null
+++ b/gcc/config/pa/long_double.h
@@ -0,0 +1,106 @@
+/* Definitions of long double support for GNU compiler.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#define LONG_DOUBLE_TYPE_SIZE 128
+
+#undef ASM_OUTPUT_LONG_DOUBLE
+#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
+do { long value[4]; \
+ REAL_VALUE_TO_TARGET_LONG_DOUBLE ((VALUE), value); \
+ fprintf((FILE), "%s\t0x%x\n", "\t.word", value[0]); \
+ fprintf((FILE), "%s\t0x%x\n", "\t.word", value[1]); \
+ fprintf((FILE), "%s\t0x%x\n", "\t.word", value[2]); \
+ fprintf((FILE), "%s\t0x%x\n", "\t.word", value[3]); \
+ } while (0)
+
+
+/* Define library calls for quad FP operations. These are all part of the
+ PA32 and PA64 ABIs. */
+#define ADDTF3_LIBCALL "_U_Qfadd"
+#define SUBTF3_LIBCALL "_U_Qfsub"
+#define MULTF3_LIBCALL "_U_Qfmpy"
+#define DIVTF3_LIBCALL "_U_Qfdiv"
+#define NEGTF2_LIBCALL "_U_Qfneg"
+#define SQRTTF2_LIBCALL "_U_Qfsqrt"
+#define ABSTF2_LIBCALL "_U_Qfabs"
+#define SMINTF3_LIBCALL "_U_Qfmin"
+#define SMAXTF3_LIBCALL "_U_Qfmax"
+#define EXTENDSFTF2_LIBCALL "_U_Qfcnvff_sgl_to_quad"
+#define EXTENDDFTF2_LIBCALL "_U_Qfcnvff_dbl_to_quad"
+#define TRUNCTFSF2_LIBCALL "_U_Qfcnvff_quad_to_sgl"
+#define TRUNCTFDF2_LIBCALL "_U_Qfcnvff_quad_to_dbl"
+#define FLOATSITF2_LIBCALL "_U_Qfcnvxf_sgl_to_quad"
+#define FLOATDITF2_LIBCALL "_U_Qfcnvxf_dbl_to_quad"
+#define FIX_TRUNCTFSI2_LIBCALL "_U_Qfcnvfxt_quad_to_sgl"
+#define FIX_TRUNCTFDI2_LIBCALL "_U_Qfcnvfxt_quad_to_dbl"
+#define EQTF2_LIBCALL "_U_Qfeq"
+#define NETF2_LIBCALL "_U_Qfne"
+#define GTTF2_LIBCALL "_U_Qfgt"
+#define GETF2_LIBCALL "_U_Qfge"
+#define LTTF2_LIBCALL "_U_Qflt"
+#define LETF2_LIBCALL "_U_Qfle"
+
+
+#define INIT_TARGET_OPTABS \
+ do { \
+ add_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, ADDTF3_LIBCALL); \
+ sub_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, SUBTF3_LIBCALL); \
+ smul_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, MULTF3_LIBCALL); \
+ flodiv_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, DIVTF3_LIBCALL); \
+ smin_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, SMINTF3_LIBCALL); \
+ smax_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, SMAXTF3_LIBCALL); \
+ sqrt_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, SQRTTF2_LIBCALL); \
+ abs_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, ABSTF2_LIBCALL); \
+ neg_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, NEGTF2_LIBCALL); \
+ extendsftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDSFTF2_LIBCALL); \
+ extenddftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDDFTF2_LIBCALL); \
+ trunctfsf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFSF2_LIBCALL); \
+ trunctfdf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFDF2_LIBCALL); \
+ floatsitf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATSITF2_LIBCALL); \
+ floatditf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATDITF2_LIBCALL); \
+ fixtfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL);\
+ fixtfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL);\
+ fixunstfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL); \
+ fixunstfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL); \
+ eqtf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EQTF2_LIBCALL); \
+ netf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, NETF2_LIBCALL); \
+ gttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GTTF2_LIBCALL); \
+ getf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GETF2_LIBCALL); \
+ lttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LTTF2_LIBCALL); \
+ letf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LETF2_LIBCALL); \
+ INIT_SUBTARGET_OPTABS; \
+ } while (0)
+
+/* This is meant to be redefined in the host dependent files */
+#define INIT_SUBTARGET_OPTABS
+
+/* Nonzero if a floating point comparison library call for
+ mode MODE that will return a boolean value. Zero if one
+ of the libgcc2 functions is used. */
+#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) ((MODE) == TFmode)
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index f74a317..68cfa0b 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -1054,10 +1054,12 @@ struct hppa_args {int words, nargs_prototype, indirect; };
/* Arguments larger than eight bytes are passed by invisible reference */
#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
- ((TYPE) && int_size_in_bytes (TYPE) > 8)
+ (((TYPE) && int_size_in_bytes (TYPE) > 8) \
+ || (MODE) && GET_MODE_SIZE (MODE) > 8)
#define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) \
- ((TYPE) && int_size_in_bytes (TYPE) > 8)
+ (((TYPE) && int_size_in_bytes (TYPE) > 8) \
+ || (MODE) && GET_MODE_SIZE (MODE) > 8)
extern struct rtx_def *hppa_compare_op0, *hppa_compare_op1;
diff --git a/gcc/config/pa/t-pa b/gcc/config/pa/t-pa
index 0d66758..b772486 100644
--- a/gcc/config/pa/t-pa
+++ b/gcc/config/pa/t-pa
@@ -1,10 +1,14 @@
LIBGCC1=libgcc1.null
CROSS_LIBGCC1=libgcc1.null
ADA_CFLAGS=-mdisable-indexing
-LIB2FUNCS_EXTRA=lib2funcs.asm
+LIB2FUNCS_EXTRA=lib2funcs.asm quadlib.asm
lib2funcs.asm: $(srcdir)/config/pa/lib2funcs.asm
rm -f lib2funcs.asm
cp $(srcdir)/config/pa/lib2funcs.asm .
+quadlib.asm: $(srcdir)/config/pa/quadlib.asm
+ rm -f quadlib.asm
+ cp $(srcdir)/config/pa/quadlib.asm .
+
TARGET_LIBGCC2_CFLAGS = -fPIC