Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
cwh_stk.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 
00036 /* ====================================================================
00037  * ====================================================================
00038  *
00039  *
00040  * Revision history:
00041  *  dd-mmm-95 - Original Version
00042  *
00043  * Description: Exports global functions in cwh_stk.c and the 
00044  *              definition of stack items.
00045  *
00046  * ====================================================================
00047  * ====================================================================
00048  */
00049 
00050 #ifndef CWH_STK_INCLUDED
00051 #define CWH_STK_INCLUDED
00052 
00053 #ifdef _KEEP_RCS_ID
00054 #endif /* _KEEP_RCS_ID */
00055 
00056 enum item_class {
00057   UNDEF,
00058   ST_item,             /* item is an ST*  */
00059   ST_item_whole_array, /* item is an ST* and represents a whole array */
00060   WN_item,             /* item is a  WN*  */
00061   WN_item_whole_array, /* item is a  WN* and represents a whole array */
00062   FLD_item,            /* item is a  FLD* */
00063   STR_item,            /* marker for string length and address */
00064   ADDR_item,           /* item is WN, address */
00065   DEREF_item,          /* item is an address, which must be deref'ed */
00066   PCONST_item,         /* item is the address (in the compiler's world) of a byte string */
00067   LB_item              /* item is a label IDX */
00068 } ;
00069 
00070 
00071 extern void cwh_stk_push( void * item, enum item_class);
00072 extern void cwh_stk_push_STR(void * len,void * addr, TY_IDX  ty, enum item_class addr_class) ;
00073 extern void cwh_stk_push_typed( void * item, enum item_class Class, TY_IDX  ty) ;
00074 
00075 extern WN  * cwh_stk_pop_WHIRL(void) ;
00076 extern WN  * cwh_stk_pop_WN(void) ;
00077 extern ST  * cwh_stk_pop_ST(void) ;
00078 extern FLD_IDX  cwh_stk_pop_FLD(void) ;
00079 extern LABEL_IDX  cwh_stk_pop_LB(void) ;
00080 extern void  cwh_stk_pop_STR(void) ;
00081 extern WN  * cwh_stk_pop_ADDR(void) ;
00082 extern WN  * cwh_stk_pop_DEREF(void) ;
00083 extern ST  * cwh_stk_pop_PCONST(void) ;
00084 extern WN   *cwh_stk_pop_iostmt(IOSTATEMENT, INT32);
00085 extern void  cwh_stk_pop_whatever(void) ;
00086 
00087 extern TY_IDX   cwh_stk_get_TY(void);
00088 extern TY_IDX   cwh_stk_get_FLD_TY(void);
00089 extern enum item_class cwh_stk_get_class(void) ;
00090 extern void cwh_stk_dump(void) ;
00091 extern INT32 cwh_stk_count_STRs(INT32 n) ;
00092 extern INT32 cwh_stk_get_num_inquire_items(void);
00093 extern void cwh_stk_push_top_item_again(void);
00094 extern void cwh_stk_verify_empty(void) ;
00095 extern char * cwh_stk_fld_name(void);  /* return a string for the field on top of the stack */
00096 extern BOOL cwh_stk_is_byte_STR(INT32 n); /* is STR n, a byte? */
00097 
00098 
00099 #endif /* CWH_STK_INCLUDED */
00100 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines