Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
00001 /* 00002 00003 Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it 00006 under the terms of version 2 of the GNU General Public License as 00007 published by the Free Software Foundation. 00008 00009 This program is distributed in the hope that it would be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 00013 Further, this software is distributed without any warranty that it is 00014 free of the rightful claim of any third person regarding infringement 00015 or the like. Any license provided herein, whether implied or 00016 otherwise, applies only to this software file. Patent licenses, if 00017 any, provided herein do not apply to combinations of this program with 00018 other software, or any other product whatsoever. 00019 00020 You should have received a copy of the GNU General Public License along 00021 with this program; if not, write the Free Software Foundation, Inc., 59 00022 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00023 00024 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00025 Mountain View, CA 94043, or: 00026 00027 http://www.sgi.com 00028 00029 For further information regarding this notice, see: 00030 00031 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00032 00033 */ 00034 00035 /* USMID @(#) clibinc/cray/fndc.h 92.2 11/16/99 11:55:31 */ 00036 00037 #ifndef _FNDC_H 00038 #define _FNDC_H 00039 00040 /* 00041 * Definitions for Fortran Numeric Data Conversion 00042 * 00043 * This information is used in assign processing (libu) and in 00044 * Fortran unformatted I/O (libf). 00045 */ 00046 00047 /* Define which systems support numeric data conversion */ 00048 00049 #if defined(_UNICOS) || defined(__mips) || defined (_LITTLE_ENDIAN) 00050 #define NUMERIC_DATA_CONVERSION_ENABLED 1 00051 #else 00052 #define NUMERIC_DATA_CONVERSION_ENABLED 0 00053 #endif 00054 00055 /* 00056 * Define numeric data conversion types. These types are used 00057 * to index into various tables. 00058 */ 00059 00060 #define NCV_NONE 0 /* No data conversion */ 00061 #define NCV_CRAY 1 /* CRAY classic */ 00062 #define NCV_IBM 2 /* IBM */ 00063 #define NCV_CDC 3 /* CDC 60-bit */ 00064 #define NCV_VMS 4 /* DEC VAX/VMS */ 00065 #define NCV_IEG 5 /* IEEE Generic (32-/64-bit) */ 00066 #define NCV_NVE 6 /* CDC 64-bit */ 00067 #define NCV_205 7 /* CDC Cyber 205 */ 00068 #define NCV_IEU 8 /* DEC Ultrix (IEG little-endian) */ 00069 #define NCV_IED 9 /* IEG, but with double-precision folded to single */ 00070 #define NCV_USER 10 /* User defined conversion */ 00071 #define NCV_SITE 11 /* Site defined conversion */ 00072 #define NCV_IBD 12 /* IBM, but with double-precision folded to single */ 00073 #define NCV_VAD 13 /* VMS, but with double-precision folded to single */ 00074 #define NCV_IUD 14 /* IEU, but with double-precision folded to single */ 00075 #define NCV_T3D 15 /* CRAY T3D/T3E */ 00076 /* (64-bit IEEE with no double-precision or denorms) */ 00077 #define NCV_IEL 16 /* IEEE Large (64-/128-bit) */ 00078 #define NCV_MIPS 17 /* MIPS (SGI) format */ 00079 #define NCV_IA 18 /* Intel Architecture (IA32/IA64) */ 00080 00081 #define NCV_MAX 19 /* 1 greater than max type number */ 00082 00083 /* 00084 * Define character set types. 00085 */ 00086 00087 #define CS_NONE 0 /* No character set conversion */ 00088 #define CS_ASCII 1 /* ASCII */ 00089 #define CS_EBCDIC 2 /* IBM EBCDIC */ 00090 #define CS_CDC 3 /* CDC 6-bit display code */ 00091 #define CS_USER 4 /* User defined conversion, deferred */ 00092 #define CS_SITE 5 /* Site defined conversion, deferred */ 00093 00094 #define CS_MAX 6 /* 1 greater than max type number */ 00095 00096 /* 00097 * Define native types. 00098 */ 00099 00100 #ifdef _CRAY1 00101 # ifdef _CRAYIEEE 00102 # define NCV_NATIVE NCV_IEL /* cray-ts,ieee */ 00103 # else 00104 # define NCV_NATIVE NCV_CRAY /* cray-ts, cray-c90, etc. */ 00105 # endif 00106 00107 #elif defined(_CRAYMPP) 00108 #define NCV_NATIVE NCV_T3D /* cray-t3d, cray-t3e, etc. */ 00109 00110 #elif defined(_MIPSEB) 00111 #define NCV_NATIVE NCV_MIPS /* MIPS */ 00112 00113 #elif defined(_LITTLE_ENDIAN) 00114 #define NCV_NATIVE NCV_IA /* Intel */ 00115 00116 #elif defined(_WORD32) 00117 #define NCV_NATIVE NCV_IEG /* 32-bit platforms */ 00118 00119 #endif 00120 00121 #define CS_NATIVE CS_ASCII 00122 00123 /* 00124 * This structure is used to build tables of conversion functions 00125 * indexed by the above NCV data conversion types. The flags are 00126 * used to indicate how the functions are to be called, or to 00127 * indicate special operations that may apply to a broader class 00128 * of conversions. 00129 */ 00130 00131 struct c_funs_s { 00132 int (* to_native)(); /* Foreign-to-native conversion */ 00133 int (* to_foreign)(); /* Native-to-foreign conversion */ 00134 unsigned new_style_func:1; /* 1 if new-style conv. func. */ 00135 unsigned cray_int_compat:1; /* 1 if ints are cray compat. */ 00136 /* (twos complment, big-endian) */ 00137 unsigned no_ieee_denorms:1; /* 1 if no ieee denorms allowed */ 00138 }; 00139 00140 /* 00141 * This structure is used to determine the length in bits of the 00142 * appropriate data types. The first word is the number of valid 00143 * words in the array of type lengths. The following words correspond 00144 * to the lengths of the data items of each type. Note that this 00145 * structure is used for old-style (Fortran 77) conversion routines 00146 * and new-style (Fortran 90) conversion routines. In the later case, 00147 * it represents the default size of the various types. 00148 */ 00149 00150 struct _dsz_s { 00151 int numtypes; /* number of types in the table */ 00152 int typlen[9]; /* length of each type (normally 8 types) */ 00153 }; 00154 00155 /* 00156 * This structure is used to determine a granularity for each numeric type. 00157 * The flag states whether alignment should be performed when reading/writing 00158 * noncharacter items. The granularity is roughly the 'word' size. 00159 * padval is the desired padd value when aligning. No conversion will 00160 * performed on this word before being written. 00161 */ 00162 00163 struct _dal_s { 00164 unsigned pflag:1; /* Padd flag */ 00165 int unu:31; /* Unused */ 00166 int gran:32; /* Granularity */ 00167 long long padval; /* Usually a word of blanks */ 00168 }; 00169 00170 /* 00171 * External arrays 00172 */ 00173 00174 extern struct c_funs_s __fndc_ncfunc [NCV_MAX]; 00175 extern struct _dsz_s *__fndc_f77sz [NCV_MAX]; 00176 extern struct _dsz_s *__fndc_f90sz [NCV_MAX]; 00177 extern struct _dal_s *__fndc_align [NCV_MAX]; 00178 extern int __fndc_charsz [CS_MAX]; 00179 00180 #endif /* !_FNDC_H */