00001 /* 00002 Copyright 2003, 2004, 2005, 2006 PathScale, Inc. All Rights Reserved. 00003 File modified June 20, 2003 by PathScale, Inc. to update Open64 C/C++ 00004 front-ends to GNU 3.2.2 release. 00005 */ 00006 00007 /* 00008 00009 Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00010 00011 This program is free software; you can redistribute it and/or modify it 00012 under the terms of version 2 of the GNU General Public License as 00013 published by the Free Software Foundation. 00014 00015 This program is distributed in the hope that it would be useful, but 00016 WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00018 00019 Further, this software is distributed without any warranty that it is 00020 free of the rightful claim of any third person regarding infringement 00021 or the like. Any license provided herein, whether implied or 00022 otherwise, applies only to this software file. Patent licenses, if 00023 any, provided herein do not apply to combinations of this program with 00024 other software, or any other product whatsoever. 00025 00026 You should have received a copy of the GNU General Public License along 00027 with this program; if not, write the Free Software Foundation, Inc., 59 00028 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00029 00030 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00031 Mountain View, CA 94043, or: 00032 00033 http://www.sgi.com 00034 00035 For further information regarding this notice, see: 00036 00037 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00038 00039 */ 00040 00041 00042 /* WFE == WHIRL Front End */ 00043 /* translate gnu decl trees to whirl */ 00044 00045 #ifndef wfe_decl_INCLUDED 00046 #define wfe_decl_INCLUDED 00047 00048 #ifndef __cplusplus 00049 typedef int INT; 00050 typedef long long INT64; 00051 typedef int TY_IDX; 00052 #ifdef KEY 00053 typedef int BOOL; 00054 typedef unsigned int UINT; 00055 #endif 00056 #endif 00057 00058 #ifdef __cplusplus 00059 extern "C" { 00060 #endif 00061 00062 /* turn a file-scope asm into a hacked-up WHIRL function */ 00063 extern void WFE_Assemble_Asm(char *); 00064 00065 /* expand gnu function decl tree into symtab & whirl */ 00066 extern void WFE_Start_Function (tree fndecl); 00067 00068 /* called after function body processed, to write out the PU */ 00069 extern void WFE_Finish_Function (void); 00070 00071 /* called for each initialized variable */ 00072 extern void WFE_Initialize_Decl (tree decl); 00073 00074 #ifdef KEY 00075 // For initialization of any variables except globals. 00076 /* called for each initialized variable */ 00077 extern void WFE_Initialize_Nested_Decl (tree decl); 00078 00079 // Handle to get CURRENT_SYMTAB i.e., current scope level 00080 extern INT WFE_Get_Current_Scope (); 00081 00082 extern bool defer_function; 00083 00084 // Initialize a vector. 00085 extern void Traverse_Aggregate_Vector_Const (ST *, tree, BOOL, UINT); 00086 #endif /* KEY */ 00087 00088 /* called for each aggregate initialization */ 00089 extern void WFE_Start_Aggregate_Init (tree decl); 00090 00091 /* add padding to aggregate initialization */ 00092 extern void WFE_Add_Aggregate_Init_Padding (INT size); 00093 00094 /* add integer to aggregate initialization */ 00095 extern void WFE_Add_Aggregate_Init_Integer (INT64 val, INT size); 00096 00097 /* add double to aggregate initialization */ 00098 extern void WFE_Add_Aggregate_Init_Real (REAL_VALUE_TYPE val, INT size); 00099 00100 /* add string to aggregate initialization */ 00101 extern void WFE_Add_Aggregate_Init_String (const char *s, INT size); 00102 00103 /* add address to aggregate initialization */ 00104 extern void WFE_Add_Aggregate_Init_Address (tree t); 00105 00106 /* finish aggregate init, and set size if not previously known */ 00107 extern void WFE_Finish_Aggregate_Init (void); 00108 00109 /* generate a temp with extension 'name' having the initialization as specified 00110 by 'init' */ 00111 extern ST *WFE_Generate_Temp_For_Initialized_Aggregate (tree init, char *name); 00112 00113 /* handle __attribute__ ((alias)) */ 00114 extern void WFE_Assemble_Alias (tree decl, tree target); 00115 00116 /* handle __attribute__ ((constructor)) */ 00117 extern void WFE_Assemble_Constructor (const char *name); 00118 00119 /* handle __attribute__ ((destructor)) */ 00120 extern void WFE_Assemble_Destructor (const char *name); 00121 00122 /* call this routine when have a decl that doesn't have an initialization */ 00123 extern void WFE_Decl (tree decl); 00124 00125 /* call this routine to determine the return address ST at specified level */ 00126 extern ST *WFE_Get_Return_Address_ST (int level); 00127 00128 /* call this routine to save the SP for first alloca in a scope */ 00129 extern ST *WFE_Alloca_0 (void); 00130 00131 /* call this routine to assign ST for VLA as well as allocate space for it */ 00132 extern ST *WFE_Alloca_ST (tree decl); 00133 00134 /* call this routine to deallocate STs for VLA */ 00135 extern void WFE_Dealloca (ST *alloca0_st, tree vars); 00136 00137 /* call this routine to record variables assigned to registers using asm */ 00138 extern void WFE_Record_Asmspec_For_ST (tree decl, const char *asmspec, int reg); 00139 00140 /* call this routine to resolve conflicts between duplicate declarations */ 00141 extern void WFE_Resolve_Duplicate_Decls (tree olddecl, tree newdecl); 00142 00143 /* call this routine to process pragma weak on encountering pragma */ 00144 extern void WFE_Add_Weak(); 00145 00146 /* call this routine to process pragma weak declarations at end */ 00147 extern void WFE_Weak_Finish(); 00148 00149 /* variable to keep track track of ST to be used for varargs */ 00150 extern ST *WFE_Vararg_Start_ST; 00151 00152 #ifdef PATHSCALE_MERGE 00153 #ifdef REAL_VALUE_TYPE 00154 float WFE_Convert_Internal_Real_to_IEEE_Single(REAL_VALUE_TYPE); 00155 double WFE_Convert_Internal_Real_to_IEEE_Double(REAL_VALUE_TYPE); 00156 long double WFE_Convert_Internal_Real_to_IEEE_Double_Extended(REAL_VALUE_TYPE); 00157 #endif 00158 #endif 00159 00160 #ifdef __cplusplus 00161 } 00162 #endif 00163 00164 #endif
1.5.6