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) 2001 Tensilica, Inc. All Rights Reserved. 00010 Revised to support Tensilica processors and to improve overall performance 00011 */ 00012 00013 /* 00014 00015 Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00016 00017 This program is free software; you can redistribute it and/or modify it 00018 under the terms of version 2 of the GNU General Public License as 00019 published by the Free Software Foundation. 00020 00021 This program is distributed in the hope that it would be useful, but 00022 WITHOUT ANY WARRANTY; without even the implied warranty of 00023 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00024 00025 Further, this software is distributed without any warranty that it is 00026 free of the rightful claim of any third person regarding infringement 00027 or the like. Any license provided herein, whether implied or 00028 otherwise, applies only to this software file. Patent licenses, if 00029 any, provided herein do not apply to combinations of this program with 00030 other software, or any other product whatsoever. 00031 00032 You should have received a copy of the GNU General Public License along 00033 with this program; if not, write the Free Software Foundation, Inc., 59 00034 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00035 00036 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00037 Mountain View, CA 94043, or: 00038 00039 http://www.sgi.com 00040 00041 For further information regarding this notice, see: 00042 00043 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00044 00045 */ 00046 00047 00048 /* WFE == WHIRL Front End */ 00049 /* translate gnu expr trees to whirl */ 00050 00051 #ifndef wn_expr_INCLUDED 00052 #define wn_expr_INCLUDED 00053 00054 #ifdef __cplusplus 00055 extern "C" { 00056 #endif 00057 00058 /* One time initialization */ 00059 extern void WFE_Expr_Init (void); 00060 00061 /* expand one gnu stmt tree into symtab & whirl */ 00062 extern void WFE_One_Stmt (tree exp); 00063 00064 /* generate a RET statement */ 00065 extern void WFE_Null_Return (void); 00066 00067 #ifdef __cplusplus 00068 } 00069 #endif 00070 00071 #ifdef __cplusplus 00072 // expand one gnu expr tree into whirl; called only from C++ files 00073 extern WN * WFE_Expand_Expr (tree exp, 00074 bool need_result = TRUE, 00075 TY_IDX nop_ty_idx = 0, 00076 TY_IDX component_ty_idx = 0, 00077 INT64 component_offset = 0, 00078 UINT32 field_id = 0, 00079 bool is_bit_field = FALSE, 00080 bool expect_boolean = FALSE); 00081 00082 extern WN *WFE_Rcomma_Block; 00083 extern int WFE_Disable_Rcomma; 00084 extern WN* WFE_Expand_Expr_With_Sequence_Point (tree exp, TYPE_ID mtype); 00085 00086 /* rhs is the WN representing the rhs of a MODIFY_EXPR node; this routine 00087 * processes the lhs of the node and generate the appropriate form of store 00088 */ 00089 extern WN * WFE_Lhs_Of_Modify_Expr (tree_code assign_code, 00090 tree lhs, 00091 #ifdef TARG_SL 00092 tree rhs, 00093 #endif 00094 bool need_result, 00095 TY_IDX component_ty_idx, 00096 INT64 component_offset, 00097 UINT32 field_id, 00098 bool is_bit_field, 00099 WN *rhs_wn, 00100 PREG_NUM rhs_preg_num, 00101 bool is_realpart, 00102 bool is_imagpart); 00103 00104 /* get integer value from INTEGER_CST node */ 00105 extern UINT64 Get_Integer_Value (tree exp); 00106 00107 /* traverse the tree and addr_saved if address of a variable is taken */ 00108 extern void WFE_Set_ST_Addr_Saved (WN *); 00109 00110 #ifdef PATHSCALE_MERGE 00111 // bug fix for OSP_94 00112 // 00113 extern TYPE_ID Widen_Mtype (TYPE_ID ); 00114 #endif 00115 00116 #ifdef KEY 00117 // Convert inplace target order words in 'buf' to host order. 'buf' is a two 00118 // word array. 00119 extern void WFE_Convert_To_Host_Order (long *buf); 00120 extern nesting * wfe_nesting_stack, * wfe_cond_stack, * wfe_loop_stack, * wfe_case_stack; 00121 #endif 00122 00123 #endif /* __cplusplus */ 00124 00125 #ifdef __cplusplus 00126 extern "C" { 00127 #endif /* __cplusplus */ 00128 00129 extern void WFE_Expand_Start_Stmt_Expr (tree); 00130 extern void WFE_Expand_End_Stmt_Expr (tree); 00131 00132 00133 #ifdef __cplusplus 00134 } 00135 #endif /* __cplusplus */ 00136 00137 #endif
1.5.6