gofast.h revision 90075
1/* US Software GOFAST floating point library support. 2 Copyright (C) 1994, 1998, 1999 Free Software Foundation, Inc. 3 4This file is part of GNU CC. 5 6GNU CC is free software; you can redistribute it and/or modify 7it under the terms of the GNU General Public License as published by 8the Free Software Foundation; either version 2, or (at your option) 9any later version. 10 11GNU CC is distributed in the hope that it will be useful, 12but WITHOUT ANY WARRANTY; without even the implied warranty of 13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14GNU General Public License for more details. 15 16You should have received a copy of the GNU General Public License 17along with GNU CC; see the file COPYING. If not, write to 18the Free Software Foundation, 59 Temple Place - Suite 330, 19Boston, MA 02111-1307, USA. */ 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 \ 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 sdiv_optab->handlers[(int) SFmode].libfunc = init_one_libfunc ("fpdiv"); \ 54 sdiv_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"); \ 57\ 58 extendsfdf2_libfunc = init_one_libfunc ("fptodp"); \ 59 truncdfsf2_libfunc = init_one_libfunc ("dptofp"); \ 60\ 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"); \ 67\ 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"); \ 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 = 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"); \ 95 96/* End of GOFAST_RENAME_LIBCALLS */ 97