]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/pa/long_double.h
optabs.h (OTI_flodiv, [...]): Kill.
[thirdparty/gcc.git] / gcc / config / pa / long_double.h
1 /* Definitions of long double support for GNU compiler.
2 Copyright (C) 2000 Free Software Foundation, Inc.
3
4 This file is part of GNU CC.
5
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.
10
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.
15
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. */
20
21 #define LONG_DOUBLE_TYPE_SIZE 128
22
23 #undef ASM_OUTPUT_LONG_DOUBLE
24 #define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
25 do { long value[4]; \
26 REAL_VALUE_TO_TARGET_LONG_DOUBLE ((VALUE), value); \
27 fprintf((FILE), "%s\t0x%x\n", "\t.word", value[0]); \
28 fprintf((FILE), "%s\t0x%x\n", "\t.word", value[1]); \
29 fprintf((FILE), "%s\t0x%x\n", "\t.word", value[2]); \
30 fprintf((FILE), "%s\t0x%x\n", "\t.word", value[3]); \
31 } while (0)
32
33
34 /* Define library calls for quad FP operations. These are all part of the
35 PA32 and PA64 ABIs. */
36 #define ADDTF3_LIBCALL "_U_Qfadd"
37 #define SUBTF3_LIBCALL "_U_Qfsub"
38 #define MULTF3_LIBCALL "_U_Qfmpy"
39 #define DIVTF3_LIBCALL "_U_Qfdiv"
40 #define NEGTF2_LIBCALL "_U_Qfneg"
41 #define SQRTTF2_LIBCALL "_U_Qfsqrt"
42 #define ABSTF2_LIBCALL "_U_Qfabs"
43 #define SMINTF3_LIBCALL "_U_Qfmin"
44 #define SMAXTF3_LIBCALL "_U_Qfmax"
45 #define EXTENDSFTF2_LIBCALL "_U_Qfcnvff_sgl_to_quad"
46 #define EXTENDDFTF2_LIBCALL "_U_Qfcnvff_dbl_to_quad"
47 #define TRUNCTFSF2_LIBCALL "_U_Qfcnvff_quad_to_sgl"
48 #define TRUNCTFDF2_LIBCALL "_U_Qfcnvff_quad_to_dbl"
49 #define FLOATSITF2_LIBCALL "_U_Qfcnvxf_sgl_to_quad"
50 #define FLOATDITF2_LIBCALL "_U_Qfcnvxf_dbl_to_quad"
51 /* We need to put a wrapper function around _U_Qfcnvfxt_quad_to_sgl so that
52 we can massage its return value for PA64. */
53 #define FIX_TRUNCTFSI2_LIBCALL \
54 (TARGET_64BIT ? "__U_Qfcnvfxt_quad_to_sgl" : "_U_Qfcnvfxt_quad_to_sgl")
55 #define FIXUNS_TRUNCTFSI2_LIBCALL "_U_Qfcnvfxt_quad_to_usgl"
56 #define FIX_TRUNCTFDI2_LIBCALL "_U_Qfcnvfxt_quad_to_dbl"
57 #define EQTF2_LIBCALL "_U_Qfeq"
58 #define NETF2_LIBCALL "_U_Qfne"
59 #define GTTF2_LIBCALL "_U_Qfgt"
60 #define GETF2_LIBCALL "_U_Qfge"
61 #define LTTF2_LIBCALL "_U_Qflt"
62 #define LETF2_LIBCALL "_U_Qfle"
63
64
65 #define INIT_TARGET_OPTABS \
66 do { \
67 add_optab->handlers[(int) TFmode].libfunc \
68 = gen_rtx_SYMBOL_REF (Pmode, ADDTF3_LIBCALL); \
69 sub_optab->handlers[(int) TFmode].libfunc \
70 = gen_rtx_SYMBOL_REF (Pmode, SUBTF3_LIBCALL); \
71 smul_optab->handlers[(int) TFmode].libfunc \
72 = gen_rtx_SYMBOL_REF (Pmode, MULTF3_LIBCALL); \
73 sdiv_optab->handlers[(int) TFmode].libfunc \
74 = gen_rtx_SYMBOL_REF (Pmode, DIVTF3_LIBCALL); \
75 smin_optab->handlers[(int) TFmode].libfunc \
76 = gen_rtx_SYMBOL_REF (Pmode, SMINTF3_LIBCALL); \
77 smax_optab->handlers[(int) TFmode].libfunc \
78 = gen_rtx_SYMBOL_REF (Pmode, SMAXTF3_LIBCALL); \
79 sqrt_optab->handlers[(int) TFmode].libfunc \
80 = gen_rtx_SYMBOL_REF (Pmode, SQRTTF2_LIBCALL); \
81 abs_optab->handlers[(int) TFmode].libfunc \
82 = gen_rtx_SYMBOL_REF (Pmode, ABSTF2_LIBCALL); \
83 neg_optab->handlers[(int) TFmode].libfunc \
84 = gen_rtx_SYMBOL_REF (Pmode, NEGTF2_LIBCALL); \
85 extendsftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDSFTF2_LIBCALL); \
86 extenddftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDDFTF2_LIBCALL); \
87 trunctfsf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFSF2_LIBCALL); \
88 trunctfdf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFDF2_LIBCALL); \
89 floatsitf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATSITF2_LIBCALL); \
90 floatditf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATDITF2_LIBCALL); \
91 fixtfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL);\
92 fixtfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL);\
93 fixunstfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIXUNS_TRUNCTFSI2_LIBCALL);\
94 fixunstfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL); \
95 eqtf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EQTF2_LIBCALL); \
96 netf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, NETF2_LIBCALL); \
97 gttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GTTF2_LIBCALL); \
98 getf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GETF2_LIBCALL); \
99 lttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LTTF2_LIBCALL); \
100 letf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LETF2_LIBCALL); \
101 INIT_SUBTARGET_OPTABS; \
102 } while (0)
103
104 /* This is meant to be redefined in the host dependent files */
105 #define INIT_SUBTARGET_OPTABS
106
107 /* Nonzero if a floating point comparison library call for
108 mode MODE that will return a boolean value. Zero if one
109 of the libgcc2 functions is used. */
110 #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) ((MODE) == TFmode)