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 00036 /* ==================================================================== 00037 * ==================================================================== 00038 * 00039 * 00040 * Revision history: 00041 * dd-mmm-95 - Original Version 00042 * 00043 * Description: Exports interfaces from cwh_stab.c (symbol tables). 00044 * Most descriptions are in cwh_stab.{c,i} 00045 * 00046 * ==================================================================== 00047 * ==================================================================== 00048 */ 00049 00050 #ifndef CWH_STAB_INCLUDED 00051 #define CWH_STAB_INCLUDED 00052 00053 #ifdef _KEEP_RCS_ID 00054 #endif /* _KEEP_RCS_ID */ 00055 00056 00057 /* -------------------------------------------------------- 00058 TAGs for handing back items from fei_object and fei_seg 00059 to PGDCS. PDGCS stores them and gives them back later. 00060 We need to know what we're given. 00061 */ 00062 00063 enum is_form { 00064 is_UNDEF=0, 00065 is_ST, 00066 is_WN, 00067 is_CONST, 00068 is_SCLASS, 00069 is_PCONST, /* Pattern constant */ 00070 is_SCONST, /* Pattern constant for a string */ 00071 is_LIST /* LIST from fei_name */ 00072 } ; 00073 00074 typedef struct al { 00075 void * item ; 00076 TY_IDX ty ; /* TY of item, restricted, see fn below*/ 00077 enum is_form form ; 00078 struct al * next ; 00079 } STB_pkt; 00080 00081 #define cast_to_SCLASS(x) ((ST_SCLASS) (INT)(x)) 00082 #define cast_to_LIST(x) ((LIST *) (void *)(x)) 00083 00084 extern STB_pkt * cwh_stab_packet(void * thing, enum is_form fm) ; 00085 extern STB_pkt * cwh_stab_packet_typed(void * thing, enum is_form fm, TY_IDX ty) ; 00086 extern ST * cwh_stab_seen_derived_type_or_imported_var(ST *c, char* name); 00087 #define IS_FORMAL(s) (((ST_sclass(s) == SCLASS_FORMAL) || \ 00088 (ST_sclass(s) == SCLASS_FORMAL_REF)) && \ 00089 (!Has_Base_Block(st))) 00090 00091 #define IS_COMMON(s) ((ST_sclass(s) == SCLASS_COMMON) || \ 00092 (ST_sclass(s) == SCLASS_MODULE) || \ 00093 (ST_sclass(s) == SCLASS_DGLOBAL)) 00094 00095 #define IS_AUTO_OR_FORMAL(s) ((ST_sclass(s) == SCLASS_FORMAL) || \ 00096 (ST_sclass(s) == SCLASS_FORMAL_REF) || \ 00097 (ST_sclass(s) == SCLASS_AUTO)) 00098 00099 /*------------------------------------------------------ 00100 00101 globals set in cwh_stab.c , see cwh_stab.i for details 00102 00103 */ 00104 00105 extern ST * Procedure_ST ; 00106 extern ST * Altaddress_ST ; 00107 extern PREG_det preg_for_distribute; 00108 extern BOOL cwh_stab_pu_has_globals; /* Were any global symbols seen in the PU */ 00109 extern INT32 cwh_assign_label_id; 00110 00111 00112 /*------------------------------------------------------ 00113 00114 general function definitions 00115 00116 */ 00117 00118 extern WN * cwh_stab_const(ST *st) ; 00119 extern void cwh_stab_end_procs(void); 00120 extern void cwh_stab_add_pragma(ST *st, WN_PRAGMA_ACCESSED_FLAGS flag ); 00121 extern void cwh_stab_set_symtab(ST *st) ; 00122 extern ST * cwh_stab_const_ST(WN *wn) ; 00123 extern ST * cwh_stab_address_temp_ST(char * name, TY_IDX ty , BOOL uniq); 00124 extern ST * cwh_stab_temp_ST(TY_IDX ty,char * name) ; 00125 extern WN * cwh_load_distribute_temp(void); 00126 extern ST * cwh_stab_main_ST(void) ; 00127 extern TY_IDX cwh_stab_altentry_TY(ST *st, BOOL expr); 00128 00129 00130 extern void New_Auxst (SYMTAB_IDX level, ST_IDX idx); 00131 extern ST * F90_New_ST (SYMTAB_IDX level); 00132 extern void cwh_stab_init_auxst_tab_size(void); 00133 extern void cwh_stab_set_tylist_for_entries(ST *st); 00134 extern LABEL& F90_New_LABEL(SYMTAB_IDX scope, LABEL_IDX& label_idx); 00135 extern void cwh_stab_emit_commons_and_equivalences(SYMTAB_IDX level); 00136 extern ST * cwh_stab_mk_fn_0args(char *name, ST_EXPORT eclass,SYMTAB_IDX level,TY_IDX rty) ; 00137 00138 #endif /* CWH_STAB_INCLUDED */ 00139 00140