Mark ChangeLog
[official-gcc.git] / gcc / config / gofast.h
blobdd09ea11b144e87bd472a31e9210a8578d597ebb
1 /* US Software GOFAST floating point library support.
2 Copyright (C) 1994, 1998, 1999 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 /* This is used by fp-bit.c. */
22 #define US_SOFTWARE_GOFAST
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.
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. */
32 #define INIT_GOFAST_OPTABS \
33 do { \
34 GOFAST_CLEAR_NEG_FLOAT_OPTAB; \
35 GOFAST_RENAME_LIBCALLS; \
36 } while (0)
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)
46 #define GOFAST_RENAME_LIBCALLS \
47 add_optab->handlers[(int) SFmode].libfunc = init_one_libfunc ("fpadd"); \
48 add_optab->handlers[(int) DFmode].libfunc = init_one_libfunc ("dpadd"); \
49 sub_optab->handlers[(int) SFmode].libfunc = init_one_libfunc ("fpsub"); \
50 sub_optab->handlers[(int) DFmode].libfunc = init_one_libfunc ("dpsub"); \
51 smul_optab->handlers[(int) SFmode].libfunc = init_one_libfunc ("fpmul"); \
52 smul_optab->handlers[(int) DFmode].libfunc = init_one_libfunc ("dpmul"); \
53 flodiv_optab->handlers[(int) SFmode].libfunc = init_one_libfunc ("fpdiv"); \
54 flodiv_optab->handlers[(int) DFmode].libfunc = init_one_libfunc ("dpdiv"); \
55 cmp_optab->handlers[(int) SFmode].libfunc = init_one_libfunc ("fpcmp"); \
56 cmp_optab->handlers[(int) DFmode].libfunc = init_one_libfunc ("dpcmp"); \
58 extendsfdf2_libfunc = init_one_libfunc ("fptodp"); \
59 truncdfsf2_libfunc = init_one_libfunc ("dptofp"); \
61 eqsf2_libfunc = init_one_libfunc ("fpcmp"); \
62 nesf2_libfunc = init_one_libfunc ("fpcmp"); \
63 gtsf2_libfunc = init_one_libfunc ("fpcmp"); \
64 gesf2_libfunc = init_one_libfunc ("fpcmp"); \
65 ltsf2_libfunc = init_one_libfunc ("fpcmp"); \
66 lesf2_libfunc = init_one_libfunc ("fpcmp"); \
68 eqdf2_libfunc = init_one_libfunc ("dpcmp"); \
69 nedf2_libfunc = init_one_libfunc ("dpcmp"); \
70 gtdf2_libfunc = init_one_libfunc ("dpcmp"); \
71 gedf2_libfunc = init_one_libfunc ("dpcmp"); \
72 ltdf2_libfunc = init_one_libfunc ("dpcmp"); \
73 ledf2_libfunc = init_one_libfunc ("dpcmp"); \
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; \
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; \
89 floatsisf_libfunc = init_one_libfunc ("sitofp"); \
90 floatsidf_libfunc = init_one_libfunc ("litodp"); \
91 fixsfsi_libfunc = init_one_libfunc ("fptosi"); \
92 fixdfsi_libfunc = init_one_libfunc ("dptoli"); \
93 fixunssfsi_libfunc = init_one_libfunc ("fptoui"); \
94 fixunsdfsi_libfunc = init_one_libfunc ("dptoul"); \
96 /* End of GOFAST_RENAME_LIBCALLS */