FSF GCC merge 02/23/03
[official-gcc.git] / gcc / config / ia64 / hpux_longdouble.h
blob53330332be8c1fbb9558bdf062b1c67d55baf120
1 /* Definitions of long double support for GNU compiler.
2 Copyright (C) 2000, 2001 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* We are using IEEE quad precision, not a double-extended with padding. */
22 #undef INTEL_EXTENDED_IEEE_FORMAT
23 #define INTEL_EXTENDED_IEEE_FORMAT 0
25 /* Define library calls for quad FP operations. These are all part of the
26 IA32 and IA64 ABIs. */
28 #define ADDTF3_LIBCALL "_U_Qfadd"
29 #define SUBTF3_LIBCALL "_U_Qfsub"
30 #define MULTF3_LIBCALL "_U_Qfmpy"
31 #define DIVTF3_LIBCALL "_U_Qfdiv"
32 #define NEGTF2_LIBCALL "_U_Qfneg"
33 #define ABSTF2_LIBCALL "_U_Qfabs"
34 #define SMINTF3_LIBCALL "_U_Qfmin"
35 #define SMAXTF3_LIBCALL "_U_Qfmax"
36 #define EXTENDSFTF2_LIBCALL "_U_Qfcnvff_sgl_to_quad"
37 #define EXTENDDFTF2_LIBCALL "_U_Qfcnvff_dbl_to_quad"
38 #define TRUNCTFSF2_LIBCALL "_U_Qfcnvff_quad_to_sgl"
39 #define TRUNCTFDF2_LIBCALL "_U_Qfcnvff_quad_to_dbl"
40 #define FLOATSITF2_LIBCALL "_U_Qfcnvxf_sgl_to_quad"
41 #define FLOATDITF2_LIBCALL "_U_Qfcnvxf_dbl_to_quad"
42 #define FIX_TRUNCTFSI2_LIBCALL "_U_Qfcnvfxt_quad_to_sgl"
43 #define FIX_TRUNCTFDI2_LIBCALL "_U_Qfcnvfxt_quad_to_dbl"
44 #define FIXUNS_TRUNCTFSI2_LIBCALL "_U_Qfcnvfxut_quad_to_sgl"
45 #define FIXUNS_TRUNCTFDI2_LIBCALL "_U_Qfcnvfxut_quad_to_dbl"
46 #define EQTF2_LIBCALL "_U_Qfeq"
47 #define NETF2_LIBCALL "_U_Qfne"
48 #define GTTF2_LIBCALL "_U_Qfgt"
49 #define GETF2_LIBCALL "_U_Qfge"
50 #define LTTF2_LIBCALL "_U_Qflt"
51 #define LETF2_LIBCALL "_U_Qfle"
54 #undef INIT_TARGET_OPTABS
55 #define INIT_TARGET_OPTABS \
56 do { \
57 add_optab->handlers[(int) TFmode].libfunc \
58 = gen_rtx_SYMBOL_REF (Pmode, ADDTF3_LIBCALL); \
59 sub_optab->handlers[(int) TFmode].libfunc \
60 = gen_rtx_SYMBOL_REF (Pmode, SUBTF3_LIBCALL); \
61 smul_optab->handlers[(int) TFmode].libfunc \
62 = gen_rtx_SYMBOL_REF (Pmode, MULTF3_LIBCALL); \
63 sdiv_optab->handlers[(int) TFmode].libfunc \
64 = gen_rtx_SYMBOL_REF (Pmode, DIVTF3_LIBCALL); \
65 smin_optab->handlers[(int) TFmode].libfunc \
66 = gen_rtx_SYMBOL_REF (Pmode, SMINTF3_LIBCALL); \
67 smax_optab->handlers[(int) TFmode].libfunc \
68 = gen_rtx_SYMBOL_REF (Pmode, SMAXTF3_LIBCALL); \
69 abs_optab->handlers[(int) TFmode].libfunc \
70 = gen_rtx_SYMBOL_REF (Pmode, ABSTF2_LIBCALL); \
71 neg_optab->handlers[(int) TFmode].libfunc \
72 = gen_rtx_SYMBOL_REF (Pmode, NEGTF2_LIBCALL); \
73 extendsftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDSFTF2_LIBCALL); \
74 extenddftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDDFTF2_LIBCALL); \
75 trunctfsf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFSF2_LIBCALL); \
76 trunctfdf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFDF2_LIBCALL); \
77 floatsitf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATSITF2_LIBCALL); \
78 floatditf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATDITF2_LIBCALL); \
79 fixtfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL);\
80 fixtfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL);\
81 fixunstfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIXUNS_TRUNCTFSI2_LIBCALL); \
82 fixunstfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIXUNS_TRUNCTFDI2_LIBCALL); \
83 eqtf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EQTF2_LIBCALL); \
84 netf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, NETF2_LIBCALL); \
85 gttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GTTF2_LIBCALL); \
86 getf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GETF2_LIBCALL); \
87 lttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LTTF2_LIBCALL); \
88 letf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LETF2_LIBCALL); \
90 INIT_SUBTARGET_OPTABS; \
91 } while (0)
93 /* This is meant to be redefined in the host dependent files */
94 #define INIT_SUBTARGET_OPTABS
96 /* Nonzero if a floating point comparison library call for
97 mode MODE that will return a boolean value. Zero if one
98 of the libgcc2 functions is used. */
99 #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) ((MODE) == TFmode)