1 /* intrin.h -- Public interface for intrin.c 2 Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. 3 Contributed by James Craig Burley. 4 5 This file is part of GNU Fortran. 6 7 GNU Fortran is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 2, or (at your option) 10 any later version. 11 12 GNU Fortran is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with GNU Fortran; see the file COPYING. If not, write to 19 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 20 02111-1307, USA. 21 22 */ 23 24 #ifndef GCC_F_INTRIN_H 25 #define GCC_F_INTRIN_H 26 27 #ifndef FFEINTRIN_DOC 28 #define FFEINTRIN_DOC 0 /* 1 means intrinsic documentation only (intdoc.c). */ 29 #endif 30 31 typedef enum 32 { 33 FFEINTRIN_familyNONE, /* Not in any family. */ 34 FFEINTRIN_familyF77, /* ANSI FORTRAN 77. */ 35 FFEINTRIN_familyGNU, /* GNU Fortran intrinsics. */ 36 FFEINTRIN_familyF2C, /* f2c intrinsics. */ 37 FFEINTRIN_familyF90, /* Fortran 90. */ 38 FFEINTRIN_familyF95 = FFEINTRIN_familyF90, 39 FFEINTRIN_familyVXT, /* VAX/VMS FORTRAN. */ 40 FFEINTRIN_familyMIL, /* MIL STD 1753 (MVBITS, etc), in mil, vxt, and f90. */ 41 FFEINTRIN_familyASC, /* ASCII-related (ACHAR, IACHAR), both f2c and f90. */ 42 FFEINTRIN_familyFVZ, /* in both f2c and VAX/VMS FORTRAN. */ 43 FFEINTRIN_familyF2U, /* libf2c/libU77 UNIX system intrinsics. */ 44 FFEINTRIN_familyBADU77, /* libU77 UNIX system intrinsics with bad form. */ 45 FFEINTRIN_family 46 } ffeintrinFamily; 47 48 typedef enum 49 { 50 #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) 51 #define DEFGEN(CODE,NAME,SPEC1,SPEC2) FFEINTRIN_gen ## CODE, 52 #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) 53 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) 54 #define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) 55 #include "intrin.def" 56 #undef DEFNAME 57 #undef DEFGEN 58 #undef DEFSPEC 59 #undef DEFIMP 60 #undef DEFIMPY 61 FFEINTRIN_gen 62 } ffeintrinGen; 63 64 typedef enum 65 { 66 #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) 67 #define DEFGEN(CODE,NAME,SPEC1,SPEC2) 68 #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) FFEINTRIN_spec ## CODE, 69 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) 70 #define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) 71 #include "intrin.def" 72 #undef DEFNAME 73 #undef DEFGEN 74 #undef DEFSPEC 75 #undef DEFIMP 76 #undef DEFIMPY 77 FFEINTRIN_spec 78 } ffeintrinSpec; 79 80 typedef enum 81 { 82 #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) 83 #define DEFGEN(CODE,NAME,SPEC1,SPEC2) 84 #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) 85 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \ 86 FFEINTRIN_imp ## CODE, 87 #define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \ 88 FFEINTRIN_imp ## CODE, 89 #include "intrin.def" 90 #undef DEFNAME 91 #undef DEFGEN 92 #undef DEFSPEC 93 #undef DEFIMP 94 #undef DEFIMPY 95 FFEINTRIN_imp 96 } ffeintrinImp; 97 98 #if !FFEINTRIN_DOC 99 100 #include "bld.h" 101 #include "info.h" 102 103 ffeinfoBasictype ffeintrin_basictype (ffeintrinSpec spec); 104 ffeintrinFamily ffeintrin_family (ffeintrinSpec spec); 105 void ffeintrin_fulfill_generic (ffebld *expr, ffeinfo *info, ffelexToken t); 106 void ffeintrin_fulfill_specific (ffebld *expr, ffeinfo *info, 107 bool *check_intrin, ffelexToken t); 108 ffecomGfrt ffeintrin_gfrt_direct (ffeintrinImp imp); 109 ffecomGfrt ffeintrin_gfrt_indirect (ffeintrinImp imp); 110 void ffeintrin_init_0 (void); 111 #define ffeintrin_init_1() 112 #define ffeintrin_init_2() 113 #define ffeintrin_init_3() 114 #define ffeintrin_init_4() 115 bool ffeintrin_is_actualarg (ffeintrinSpec spec); 116 bool ffeintrin_is_intrinsic (const char *name, ffelexToken t, bool explicit, 117 ffeintrinGen *gen, ffeintrinSpec *spec, 118 ffeintrinImp *imp); 119 bool ffeintrin_is_standard (ffeintrinGen gen, ffeintrinSpec spec); 120 ffeinfoKindtype ffeintrin_kindtype (ffeintrinSpec spec); 121 const char *ffeintrin_name_generic (ffeintrinGen gen); 122 const char *ffeintrin_name_implementation (ffeintrinImp imp); 123 const char *ffeintrin_name_specific (ffeintrinSpec spec); 124 ffeIntrinsicState ffeintrin_state_family (ffeintrinFamily family); 125 #define ffeintrin_terminate_0() 126 #define ffeintrin_terminate_1() 127 #define ffeintrin_terminate_2() 128 #define ffeintrin_terminate_3() 129 #define ffeintrin_terminate_4() 130 131 #endif /* !FFEINTRIN_DOC */ 132 133 /* End of #include file. */ 134 135 #endif /* ! GCC_F_INTRIN_H */ 136