Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
wn_fio.h
Go to the documentation of this file.
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 
00051 #ifndef wnfio_INCLUDED
00052 #define wnfio_INCLUDED "wn_fio.h"
00053 
00054 #ifdef __cplusplus
00055 extern "C" {
00056 #endif
00057 
00058 extern INT32 mp_io;
00059 
00060 typedef struct dope_header {
00061     unsigned int        assoc     :1;   /* associated flag */
00062     unsigned int        ptr_alloc :1;   /* set if allocated by pointer */
00063     unsigned int        p_or_a    :2;   /* pointer or allocatable array. Use */
00064                                         /* enum ptrarray values.  */
00065     unsigned int        a_contig  :1;   /* array storage contiguous flag */
00066 /*
00067  * PROPOSED CHANGE:
00068  *
00069  * Add version and coarray n_dim fields.  Update the n_dim to all
00070  * up to 255 dimensions although only 20 may be the actual MAXDIM.
00071  * The f95 standard is still only 7.
00072  *
00073  *  unsigned long       dv_versn  :6;
00074  *  unsigned long                 :21;
00075  *  unsigned long                 :8;
00076  *  unsigned long       n_codim   :8;
00077  *  unsigned long                 :8;
00078  *  unsigned long       n_dim     :8;
00079  */
00080     unsigned int                  :27;  /* pad for first 32 bits        */
00081     unsigned int                  :29;  /* pad for second 32-bits       */
00082     unsigned int        n_dim     :3;   /* number of dimensions */
00083 
00084 } dope_header_type;
00085 
00086 typedef struct f90_type {
00087 
00088     unsigned int                :32;     /* used for future development */
00089     unsigned int        type    :8;     /* type code */
00090     unsigned int        dpflag  :1;     /* set if declared double precision
00091                                          * or double complex */
00092     unsigned int kind_or_star   :3;     /* Set if KIND= or *n appears in the
00093                                          * variable declaration.  Values
00094                                          * are from enum dec_codes */
00095     unsigned int        int_len :12;    /* internal length in bits of iolist
00096                                          * entity. 8 for character data to
00097                                          * indicate size of each character */
00098     unsigned int        dec_len :8;     /* declared length in bytes for *n
00099                                          * or KIND value. Ignored if
00100                                          * kind_or_star==DVD_DEFAULT */
00101 } f90_type_t;
00102 
00103 typedef struct cilist_header {
00104         unsigned int    version :8;     /* contains CILIST_VERSION */
00105         unsigned int    uflag   :8;     /* type of unit identifier */
00106         unsigned int            :4;     /* unused */
00107         unsigned int    iostatflg:1;    /* iostat= present flag */
00108         unsigned int    eorflag :1;     /* eor= present flag */
00109         unsigned int    endflag :1;     /* end= present flag */
00110         unsigned int    errflag :1;     /* err= present flag */
00111         unsigned int            :2;     /* unused */
00112         unsigned int    advcode :3;     /* ADVANCE= specifier value     */
00113         unsigned int    edcode  :1;     /* 1 if ENCODE/DECODE flag */
00114         unsigned int    internal :1;    /* 1 if internal file */
00115                                         /* must be 1 if edcode is 1 */
00116         unsigned int    dflag   :1;     /* 1 if direct access */
00117         unsigned int    fmt     :8;     /* type of format (or list-directed) */
00118         unsigned int    stksize :8;     /* size in words of stack space */
00119                                         /* passed as 3rd arg to         */
00120                                         /* _FRF/_FWF/_FRU/_FWU          */
00121         unsigned int            :8;     /* unused */
00122         unsigned int    icount  :8;     /* size of struct control list in */
00123                                         /* words */
00124 } cilist_header_type;
00125 
00126 typedef struct {
00127         unsigned int    version :3;     /* contains IOLIST_VERSION */
00128         unsigned int            :27;    /* unused */
00129 
00130         /*
00131          * Iolist table entry bits indicate whether data transfer statement
00132          * contains more than one iolist table.  If iolfirst=iollast=1, then
00133          * table is entire iolist.  If iolfirst=iollast=0, then table is
00134          * middle iolist table.
00135          */
00136 
00137         unsigned int    iolfirst:1;     /* 1 if first IO item list for current*/                                        /* statment IO statement */
00138         unsigned int    iollast :1;     /* 1 if last IO item list for current */                                        /* statment IO statement */
00139         unsigned int    icount  :16;    /* number of iolist-items in this */
00140                                         /* IO item list.  If zero and it is */
00141                                         /* both first and last io list, there */                                        /* is no io list in statement */
00142         unsigned int    ioetsize:16;    /* number of words in the current */
00143                                         /* IO item list, including this */
00144                                         /* iolist_header */
00145                                         /* On SGI systems, in 32-bit mode */
00146                                         /* this is the number of 32-bit */
00147                                         /* words, and in 64-bit mode this is */
00148                                         /* the number of 64-bit words. */
00149 } iolist_header_type ;
00150 
00151 typedef struct {
00152         unsigned int    valtype :8;     /* type of iolist entry */
00153         unsigned int            :24;    /* unused */
00154         unsigned int            :16;    /* unused */
00155         unsigned int    ioentsize:16;   /* number of words of the current */
00156                                         /* iolist item, including this */
00157                                         /* ioentry_header */
00158                                         /* On SGI systems, in 32-bit mode */
00159                                         /* this is the number of 32-bit */
00160                                         /* words, and in 64-bit mode this is */
00161                                         /* the number of 64-bit words. */
00162 } ioentry_header_type;
00163 
00164 typedef struct {
00165         unsigned int    indflag :1;     /* 1 if indexed array */
00166         unsigned int    boundchk:1;     /* Array bounds checking flag */
00167                                         /* Not used for F90 release 1. */
00168                                         /* 0=no bounds checking on array */
00169                                         /* 1=bounds checking on array */
00170 
00171         unsigned int            :30;    /* pad to end of word */
00172         unsigned int            :32;
00173 
00174 } ioarray_entry_type;
00175 
00176 #ifdef __cplusplus
00177 }
00178 #endif
00179 
00180 extern void Lower_IO_Init (void);
00181 
00182 extern WN * lower_io_statement (WN *, LOWER_ACTIONS);
00183 
00184 
00185 
00186 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines