* varasm.c (assemble_real): Use REAL_VALUE_TO_x and assemble_integer
[official-gcc.git] / gcc / config / pa / long_double.h
blob9d21eea6bc4c348e846b0c41810405608c1b6d64
1 /* Definitions of long double support for GNU compiler.
2 Copyright (C) 2000 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 #define LONG_DOUBLE_TYPE_SIZE 128
23 /* Define library calls for quad FP operations. These are all part of the
24 PA32 and PA64 ABIs. */
25 #define ADDTF3_LIBCALL "_U_Qfadd"
26 #define SUBTF3_LIBCALL "_U_Qfsub"
27 #define MULTF3_LIBCALL "_U_Qfmpy"
28 #define DIVTF3_LIBCALL "_U_Qfdiv"
29 #define NEGTF2_LIBCALL "_U_Qfneg"
30 #define SQRTTF2_LIBCALL "_U_Qfsqrt"
31 #define ABSTF2_LIBCALL "_U_Qfabs"
32 #define SMINTF3_LIBCALL "_U_Qfmin"
33 #define SMAXTF3_LIBCALL "_U_Qfmax"
34 #define EXTENDSFTF2_LIBCALL "_U_Qfcnvff_sgl_to_quad"
35 #define EXTENDDFTF2_LIBCALL "_U_Qfcnvff_dbl_to_quad"
36 #define TRUNCTFSF2_LIBCALL "_U_Qfcnvff_quad_to_sgl"
37 #define TRUNCTFDF2_LIBCALL "_U_Qfcnvff_quad_to_dbl"
38 #define FLOATSITF2_LIBCALL "_U_Qfcnvxf_sgl_to_quad"
39 #define FLOATDITF2_LIBCALL "_U_Qfcnvxf_dbl_to_quad"
40 /* We need to put a wrapper function around _U_Qfcnvfxt_quad_to_sgl so that
41 we can massage its return value for PA64. */
42 #define FIX_TRUNCTFSI2_LIBCALL \
43 (TARGET_64BIT ? "__U_Qfcnvfxt_quad_to_sgl" : "_U_Qfcnvfxt_quad_to_sgl")
44 #define FIXUNS_TRUNCTFSI2_LIBCALL "_U_Qfcnvfxt_quad_to_usgl"
45 #define FIX_TRUNCTFDI2_LIBCALL "_U_Qfcnvfxt_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 #define INIT_TARGET_OPTABS \
55 do { \
56 add_optab->handlers[(int) TFmode].libfunc \
57 = gen_rtx_SYMBOL_REF (Pmode, ADDTF3_LIBCALL); \
58 sub_optab->handlers[(int) TFmode].libfunc \
59 = gen_rtx_SYMBOL_REF (Pmode, SUBTF3_LIBCALL); \
60 smul_optab->handlers[(int) TFmode].libfunc \
61 = gen_rtx_SYMBOL_REF (Pmode, MULTF3_LIBCALL); \
62 sdiv_optab->handlers[(int) TFmode].libfunc \
63 = gen_rtx_SYMBOL_REF (Pmode, DIVTF3_LIBCALL); \
64 smin_optab->handlers[(int) TFmode].libfunc \
65 = gen_rtx_SYMBOL_REF (Pmode, SMINTF3_LIBCALL); \
66 smax_optab->handlers[(int) TFmode].libfunc \
67 = gen_rtx_SYMBOL_REF (Pmode, SMAXTF3_LIBCALL); \
68 sqrt_optab->handlers[(int) TFmode].libfunc \
69 = gen_rtx_SYMBOL_REF (Pmode, SQRTTF2_LIBCALL); \
70 abs_optab->handlers[(int) TFmode].libfunc \
71 = gen_rtx_SYMBOL_REF (Pmode, ABSTF2_LIBCALL); \
72 neg_optab->handlers[(int) TFmode].libfunc \
73 = gen_rtx_SYMBOL_REF (Pmode, NEGTF2_LIBCALL); \
74 extendsftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDSFTF2_LIBCALL); \
75 extenddftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDDFTF2_LIBCALL); \
76 trunctfsf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFSF2_LIBCALL); \
77 trunctfdf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFDF2_LIBCALL); \
78 floatsitf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATSITF2_LIBCALL); \
79 floatditf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATDITF2_LIBCALL); \
80 fixtfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL);\
81 fixtfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL);\
82 fixunstfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIXUNS_TRUNCTFSI2_LIBCALL);\
83 fixunstfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL); \
84 eqtf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EQTF2_LIBCALL); \
85 netf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, NETF2_LIBCALL); \
86 gttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GTTF2_LIBCALL); \
87 getf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GETF2_LIBCALL); \
88 lttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LTTF2_LIBCALL); \
89 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)