]>
Commit | Line | Data |
---|---|---|
627b12bc | 1 | /* US Software GOFAST floating point library support. |
c5c76735 | 2 | Copyright (C) 1994, 1998, 1999 Free Software Foundation, Inc. |
627b12bc DE |
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 | |
0af195cf RK |
18 | the Free Software Foundation, 59 Temple Place - Suite 330, |
19 | Boston, MA 02111-1307, USA. */ | |
627b12bc DE |
20 | |
21 | /* This is used by fp-bit.c. */ | |
22 | #define US_SOFTWARE_GOFAST | |
23 | ||
24 | /* The US Software GOFAST library requires special optabs support. | |
25 | There is no negation libcall, and several others have names different | |
26 | from gcc. This file consolidates the support in one place. | |
27 | ||
28 | The basic plan is to leave gcc proper alone and via some hook fix things | |
29 | after the optabs have been set up. Our main entry point is | |
30 | INIT_GOFAST_OPTABS. */ | |
31 | ||
32 | #define INIT_GOFAST_OPTABS \ | |
33 | do { \ | |
34 | GOFAST_CLEAR_NEG_FLOAT_OPTAB; \ | |
35 | GOFAST_RENAME_LIBCALLS; \ | |
36 | } while (0) | |
37 | ||
38 | #define GOFAST_CLEAR_NEG_FLOAT_OPTAB \ | |
39 | do { \ | |
40 | int mode; \ | |
41 | for (mode = SFmode; (int) mode <= (int) TFmode; \ | |
42 | mode = (enum machine_mode) ((int) mode + 1)) \ | |
43 | neg_optab->handlers[(int) mode].libfunc = NULL_RTX; \ | |
44 | } while (0) | |
45 | ||
46 | #define GOFAST_RENAME_LIBCALLS \ | |
c5c76735 JL |
47 | add_optab->handlers[(int) SFmode].libfunc = gen_rtx_SYMBOL_REF (Pmode, "fpadd"); \ |
48 | add_optab->handlers[(int) DFmode].libfunc = gen_rtx_SYMBOL_REF (Pmode, "dpadd"); \ | |
49 | sub_optab->handlers[(int) SFmode].libfunc = gen_rtx_SYMBOL_REF (Pmode, "fpsub"); \ | |
50 | sub_optab->handlers[(int) DFmode].libfunc = gen_rtx_SYMBOL_REF (Pmode, "dpsub"); \ | |
51 | smul_optab->handlers[(int) SFmode].libfunc = gen_rtx_SYMBOL_REF (Pmode, "fpmul"); \ | |
52 | smul_optab->handlers[(int) DFmode].libfunc = gen_rtx_SYMBOL_REF (Pmode, "dpmul"); \ | |
53 | flodiv_optab->handlers[(int) SFmode].libfunc = gen_rtx_SYMBOL_REF (Pmode, "fpdiv"); \ | |
54 | flodiv_optab->handlers[(int) DFmode].libfunc = gen_rtx_SYMBOL_REF (Pmode, "dpdiv"); \ | |
55 | cmp_optab->handlers[(int) SFmode].libfunc = gen_rtx_SYMBOL_REF (Pmode, "fpcmp"); \ | |
56 | cmp_optab->handlers[(int) DFmode].libfunc = gen_rtx_SYMBOL_REF (Pmode, "dpcmp"); \ | |
627b12bc | 57 | \ |
c5c76735 JL |
58 | extendsfdf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, "fptodp"); \ |
59 | truncdfsf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, "dptofp"); \ | |
627b12bc | 60 | \ |
c5c76735 JL |
61 | eqsf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, "fpcmp"); \ |
62 | nesf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, "fpcmp"); \ | |
63 | gtsf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, "fpcmp"); \ | |
64 | gesf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, "fpcmp"); \ | |
65 | ltsf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, "fpcmp"); \ | |
66 | lesf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, "fpcmp"); \ | |
627b12bc | 67 | \ |
c5c76735 JL |
68 | eqdf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, "dpcmp"); \ |
69 | nedf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, "dpcmp"); \ | |
70 | gtdf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, "dpcmp"); \ | |
71 | gedf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, "dpcmp"); \ | |
72 | ltdf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, "dpcmp"); \ | |
73 | ledf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, "dpcmp"); \ | |
627b12bc DE |
74 | \ |
75 | eqxf2_libfunc = NULL_RTX; \ | |
76 | nexf2_libfunc = NULL_RTX; \ | |
77 | gtxf2_libfunc = NULL_RTX; \ | |
78 | gexf2_libfunc = NULL_RTX; \ | |
79 | ltxf2_libfunc = NULL_RTX; \ | |
80 | lexf2_libfunc = NULL_RTX; \ | |
81 | \ | |
82 | eqtf2_libfunc = NULL_RTX; \ | |
83 | netf2_libfunc = NULL_RTX; \ | |
84 | gttf2_libfunc = NULL_RTX; \ | |
85 | getf2_libfunc = NULL_RTX; \ | |
86 | lttf2_libfunc = NULL_RTX; \ | |
87 | letf2_libfunc = NULL_RTX; \ | |
88 | \ | |
89 | floatsisf_libfunc = gen_rtx (SYMBOL_REF, Pmode, "sitofp"); \ | |
90 | floatsidf_libfunc = gen_rtx (SYMBOL_REF, Pmode, "litodp"); \ | |
91 | fixsfsi_libfunc = gen_rtx (SYMBOL_REF, Pmode, "fptosi"); \ | |
92 | fixdfsi_libfunc = gen_rtx (SYMBOL_REF, Pmode, "dptoli"); \ | |
93 | fixunssfsi_libfunc = gen_rtx (SYMBOL_REF, Pmode, "fptoui"); \ | |
94 | fixunsdfsi_libfunc = gen_rtx (SYMBOL_REF, Pmode, "dptoul"); \ | |
95 | ||
96 | /* End of GOFAST_RENAME_LIBCALLS */ |