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 * Module: stblock.h 00041 * $Revision: 1.2 $ 00042 * $Date: 02/11/07 23:41:39-00:00 $ 00043 * $Author: fchow@keyresearch.com $ 00044 * $Source: /scratch/mee/2.4-65/kpro64-pending/be/com/SCCS/s.stblock.h $ 00045 * 00046 * Revision history: 00047 * 11-Nov-94 - Original Version 00048 * 00049 * Description: 00050 * 00051 * General support for ST blocks and bases. 00052 * 00053 * See also: data_layout.h 00054 * 00055 * ==================================================================== 00056 * ==================================================================== 00057 */ 00058 #ifndef stblock_INCLUDED 00059 #define stblock_INCLUDED 00060 #include "strtab.h" 00061 #ifdef __cplusplus 00062 extern "C" { 00063 #endif 00064 00065 /* 00066 * Union two objects to use the same memory space. 00067 * Merges blk2 into container for blk1 (creating base if needed). 00068 */ 00069 extern void St_Block_Union(ST *blk1, ST *blk2); 00070 00071 /* return new ST of type CLASS_BLOCK */ 00072 extern ST *New_ST_Block (STR_IDX name, BOOL is_global, ST_SCLASS sclass, UINT16 align, INT64 size); 00073 extern ST* Copy_ST_Block (ST *orig_blk); /* return copy of class_block st */ 00074 00075 extern ST *Base_Symbol (ST *st); /* return root block symbol */ 00076 00077 /* return offset from base */ 00078 extern INT64 Offset_From_Base_Symbol ( ST *st ); 00079 00080 /* Get the base symbol and the offset from base that should be used 00081 * for addressing. */ 00082 extern void Base_Symbol_And_Offset_For_Addressing ( 00083 ST *sym, /* Symbol to analyze */ 00084 INT64 ofst, /* Offset from Symbol */ 00085 ST **base_symbol, /* Result: root base of st */ 00086 INT64 *offset_from_base /* Result: offset from primary base */ 00087 ); 00088 00089 /* 00090 * Determine the alignment of a ST. 00091 * Start with the TY_align value, 00092 * but for aggregates use Aggregate_Alignment if it is larger. 00093 */ 00094 extern INT32 Adjusted_Alignment ( ST *st); 00095 00096 /* 00097 * Determine the alignment of a ST. 00098 * Start with the Adjusted_Alignment, 00099 * but if allocated figure out an improved alignment. 00100 */ 00101 extern INT32 ST_alignment ( ST *st); 00102 00103 /* create a slink symbol in current symtab */ 00104 extern void Create_Slink_Symbol (void); 00105 00106 /* find slink symbol in specified symtab */ 00107 extern ST* Find_Slink_Symbol (SYMTAB_IDX stab); 00108 /* return slink symbol that matches the ST_symtab_id(st) */ 00109 extern ST *Find_Slink_For_ST(ST *st); 00110 00111 /* 00112 * return slink symbol at level ST_scope_id(function) - ST_scope_id(sym) 00113 */ 00114 extern ST *Find_Slink_For_Scope(ST *function, ST *sym); 00115 00116 /* Determine if the ST is an uplevel reference */ 00117 extern BOOL ST_is_uplevelTemp(const ST *); 00118 00119 #ifdef KEY 00120 extern ST *Create_FPSave_Symbol(void); 00121 extern ST *Find_FPSave_Symbol(SYMTAB_IDX); 00122 extern ST *Create_SPSave_Symbol(void); 00123 extern ST *Find_SPSave_Symbol(SYMTAB_IDX); 00124 #endif 00125 00126 #ifdef __cplusplus 00127 } 00128 #endif 00129 #endif /* stblock_INCLUDED */ 00130
1.5.6