]>
Commit | Line | Data |
---|---|---|
5ff904cd | 1 | /* intrin.h -- Public interface for intrin.c |
3852e8af | 2 | Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. |
25d7717e | 3 | Contributed by James Craig Burley. |
5ff904cd JL |
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 _H_f_intrin | |
25 | #define _H_f_intrin | |
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. */ | |
795232f7 | 45 | FFEINTRIN_family |
5ff904cd JL |
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) | |
411d4e28 | 54 | #define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) |
5ff904cd JL |
55 | #include "intrin.def" |
56 | #undef DEFNAME | |
57 | #undef DEFGEN | |
58 | #undef DEFSPEC | |
59 | #undef DEFIMP | |
411d4e28 | 60 | #undef DEFIMPY |
5ff904cd JL |
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) | |
411d4e28 | 70 | #define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) |
5ff904cd JL |
71 | #include "intrin.def" |
72 | #undef DEFNAME | |
73 | #undef DEFGEN | |
74 | #undef DEFSPEC | |
75 | #undef DEFIMP | |
411d4e28 | 76 | #undef DEFIMPY |
5ff904cd JL |
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, | |
411d4e28 CB |
87 | #define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \ |
88 | FFEINTRIN_imp ## CODE, | |
5ff904cd JL |
89 | #include "intrin.def" |
90 | #undef DEFNAME | |
91 | #undef DEFGEN | |
92 | #undef DEFSPEC | |
93 | #undef DEFIMP | |
411d4e28 | 94 | #undef DEFIMPY |
5ff904cd JL |
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 | #if FFECOM_targetCURRENT == FFECOM_targetGCC | |
109 | ffecomGfrt ffeintrin_gfrt_direct (ffeintrinImp imp); | |
110 | ffecomGfrt ffeintrin_gfrt_indirect (ffeintrinImp imp); | |
111 | #endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */ | |
112 | void ffeintrin_init_0 (void); | |
113 | #define ffeintrin_init_1() | |
114 | #define ffeintrin_init_2() | |
115 | #define ffeintrin_init_3() | |
116 | #define ffeintrin_init_4() | |
117 | bool ffeintrin_is_actualarg (ffeintrinSpec spec); | |
26f096f9 | 118 | bool ffeintrin_is_intrinsic (const char *name, ffelexToken t, bool explicit, |
5ff904cd JL |
119 | ffeintrinGen *gen, ffeintrinSpec *spec, |
120 | ffeintrinImp *imp); | |
121 | bool ffeintrin_is_standard (ffeintrinGen gen, ffeintrinSpec spec); | |
122 | ffeinfoKindtype ffeintrin_kindtype (ffeintrinSpec spec); | |
26f096f9 KG |
123 | const char *ffeintrin_name_generic (ffeintrinGen gen); |
124 | const char *ffeintrin_name_implementation (ffeintrinImp imp); | |
125 | const char *ffeintrin_name_specific (ffeintrinSpec spec); | |
5ff904cd JL |
126 | ffeIntrinsicState ffeintrin_state_family (ffeintrinFamily family); |
127 | #define ffeintrin_terminate_0() | |
128 | #define ffeintrin_terminate_1() | |
129 | #define ffeintrin_terminate_2() | |
130 | #define ffeintrin_terminate_3() | |
131 | #define ffeintrin_terminate_4() | |
132 | ||
133 | #endif /* !FFEINTRIN_DOC */ | |
134 | ||
135 | /* End of #include file. */ | |
136 | ||
137 | #endif |