Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
stblock.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  *
00041  * Revision history:
00042  *  11-Nov-94 - Original Version
00043  *
00044  * Description:
00045  *
00046  * General support for ST blocks and bases.
00047  *
00048  * See also:  data_layout.h
00049  *
00050  * ====================================================================
00051  * ====================================================================
00052  */
00053 #ifndef stblock_INCLUDED
00054 #define stblock_INCLUDED
00055 #include "strtab.h"
00056 #ifdef __cplusplus
00057 extern "C" {
00058 #endif
00059 
00060 /* 
00061  * Union two objects to use the same memory space.
00062  * Merges blk2 into container for blk1 (creating base if needed).
00063  */
00064 extern void St_Block_Union(ST *blk1, ST *blk2);
00065 
00066 /* return new ST of type CLASS_BLOCK */
00067 extern ST *New_ST_Block (STR_IDX name, BOOL is_global, ST_SCLASS sclass, UINT16 align, INT64 size);
00068 extern ST* Copy_ST_Block (ST *orig_blk); /* return copy of class_block st */
00069 
00070 extern ST *Base_Symbol (ST *st);        /* return root block symbol */
00071 
00072 /* return offset from base */
00073 extern INT64 Offset_From_Base_Symbol ( ST *st );
00074 
00075 /* Get the base symbol and the offset from base that should be used 
00076  * for addressing. */
00077 extern void  Base_Symbol_And_Offset_For_Addressing (
00078   ST *sym,                      /* Symbol to analyze */
00079   INT64 ofst,                   /* Offset from Symbol */
00080   ST **base_symbol,             /* Result: root base of st */
00081   INT64 *offset_from_base       /* Result: offset from primary base */
00082 );
00083 
00084 /* 
00085  * Determine the alignment of a ST.
00086  * Start with the TY_align value,
00087  * but for aggregates use Aggregate_Alignment if it is larger.
00088  */
00089 extern INT32 Adjusted_Alignment ( ST *st);
00090 
00091 /* 
00092  * Determine the alignment of a ST.
00093  * Start with the Adjusted_Alignment, 
00094  * but if allocated figure out an improved alignment.
00095  */
00096 extern INT32 ST_alignment ( ST *st);
00097 
00098 /* create a slink symbol in current symtab */
00099 extern void Create_Slink_Symbol (void);
00100 
00101 /* find slink symbol in specified symtab */
00102 extern ST* Find_Slink_Symbol (SYMTAB_IDX stab);
00103 /* return slink symbol that matches the ST_symtab_id(st) */
00104 extern ST *Find_Slink_For_ST(ST *st);
00105 
00106 /*
00107  * return slink symbol at level ST_scope_id(function) - ST_scope_id(sym)
00108  */
00109 extern ST *Find_Slink_For_Scope(ST *function, ST *sym);
00110 
00111 /* Determine if the ST is an uplevel reference */
00112 extern BOOL ST_is_uplevelTemp(const ST *);
00113 
00114 #ifdef __cplusplus
00115 }
00116 #endif
00117 #endif /* stblock_INCLUDED */
00118 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines