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