OSDN Git Service

JCB: update email in header.
[pf3gnuchains/gcc-fork.git] / gcc / f / intrin.h
1 /* intrin.h -- Public interface for intrin.c
2    Copyright (C) 1995-1997 Free Software Foundation, Inc.
3    Contributed by James Craig Burley (burley@gnu.org).
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. */
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 #include "intrin.def"
55 #undef DEFNAME
56 #undef DEFGEN
57 #undef DEFSPEC
58 #undef DEFIMP
59     FFEINTRIN_gen
60   } ffeintrinGen;
61
62 typedef enum
63   {
64 #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
65 #define DEFGEN(CODE,NAME,SPEC1,SPEC2)
66 #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) FFEINTRIN_spec ## CODE,
67 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
68 #include "intrin.def"
69 #undef DEFNAME
70 #undef DEFGEN
71 #undef DEFSPEC
72 #undef DEFIMP
73     FFEINTRIN_spec
74   } ffeintrinSpec;
75
76 typedef enum
77   {
78 #define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
79 #define DEFGEN(CODE,NAME,SPEC1,SPEC2)
80 #define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
81 #define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
82     FFEINTRIN_imp ## CODE,
83 #include "intrin.def"
84 #undef DEFNAME
85 #undef DEFGEN
86 #undef DEFSPEC
87 #undef DEFIMP
88     FFEINTRIN_imp
89   } ffeintrinImp;
90
91 #if !FFEINTRIN_DOC
92
93 #include "bld.h"
94 #include "info.h"
95
96 ffeinfoBasictype ffeintrin_basictype (ffeintrinSpec spec);
97 ffeintrinFamily ffeintrin_family (ffeintrinSpec spec);
98 void ffeintrin_fulfill_generic (ffebld *expr, ffeinfo *info, ffelexToken t);
99 void ffeintrin_fulfill_specific (ffebld *expr, ffeinfo *info,
100                                  bool *check_intrin, ffelexToken t);
101 #if FFECOM_targetCURRENT == FFECOM_targetGCC
102 ffecomGfrt ffeintrin_gfrt_direct (ffeintrinImp imp);
103 ffecomGfrt ffeintrin_gfrt_indirect (ffeintrinImp imp);
104 #endif  /* FFECOM_targetCURRENT == FFECOM_targetGCC */
105 void ffeintrin_init_0 (void);
106 #define ffeintrin_init_1()
107 #define ffeintrin_init_2()
108 #define ffeintrin_init_3()
109 #define ffeintrin_init_4()
110 bool ffeintrin_is_actualarg (ffeintrinSpec spec);
111 bool ffeintrin_is_intrinsic (char *name, ffelexToken t, bool explicit,
112                              ffeintrinGen *gen, ffeintrinSpec *spec,
113                              ffeintrinImp *imp);
114 bool ffeintrin_is_standard (ffeintrinGen gen, ffeintrinSpec spec);
115 ffeinfoKindtype ffeintrin_kindtype (ffeintrinSpec spec);
116 char *ffeintrin_name_generic (ffeintrinGen gen);
117 char *ffeintrin_name_implementation (ffeintrinImp imp);
118 char *ffeintrin_name_specific (ffeintrinSpec spec);
119 ffeIntrinsicState ffeintrin_state_family (ffeintrinFamily family);
120 #define ffeintrin_terminate_0()
121 #define ffeintrin_terminate_1()
122 #define ffeintrin_terminate_2()
123 #define ffeintrin_terminate_3()
124 #define ffeintrin_terminate_4()
125
126 #endif  /* !FFEINTRIN_DOC */
127
128 /* End of #include file. */
129
130 #endif