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: Export prototypes for addressing operations. 00044 * 00045 * ==================================================================== 00046 * ==================================================================== 00047 */ 00048 00049 #ifndef CWH_ADDR_INCLUDED 00050 #define CWH_ADDR_INCLUDED 00051 00052 #ifdef _KEEP_RCS_ID 00053 #endif /* _KEEP_RCS_ID */ 00054 00055 /* Offset field as 64 bits - translate into 32 later ***FIX */ 00056 00057 enum p_flag { p_RETURN_PARENT, p_RETURN_SECTION } ; 00058 00059 00060 extern void cwh_addr_init_target(void) ; 00061 extern WN * cwh_addr_load_ST(ST *st, OFFSET_64 off, TY_IDX ty) ; 00062 extern WN * cwh_addr_load_WN(WN * wn, OFFSET_64 off, TY_IDX ty) ; 00063 extern WN * cwh_addr_address_ST(ST * st,OFFSET_64 off = 0,TY_IDX ty = 0) ; 00064 extern void cwh_addr_store_ST(ST *st,OFFSET_64 off, TY_IDX ty, WN *rhs); 00065 extern void cwh_addr_pstore_ST(ST *st,OFFSET_64 off, TY_IDX ty, WN *rhs); 00066 00067 extern WN * cwh_addr_stid(ST *st, OFFSET_64 off, TY_IDX ty , WN * rhs); 00068 extern WN * cwh_addr_ldid (ST *st, OFFSET_64 off, TY_IDX ty) ; 00069 extern WN * cwh_addr_istore(WN *wn, OFFSET_64 off, TY_IDX ty, WN * rhs) ; 00070 extern WN * cwh_addr_pstore(WN *wn, OFFSET_64 off, TY_IDX ty, WN * rhs) ; 00071 00072 extern WN * cwh_addr_mload(WN *wt, OFFSET_64 off, TY_IDX ty, WN * sz) ; 00073 extern WN * cwh_addr_mstore(WN * ad, OFFSET_64 off, TY_IDX ty, WN * rhs) ; 00074 extern void cwh_addr_store_WN(WN * lhs, OFFSET_64 off, TY_IDX ty, WN * rhs) ; 00075 extern void cwh_addr_pstore_WN(WN * lhs, OFFSET_64 off, TY_IDX ty, WN * rhs) ; 00076 extern BOOL cwh_addr_is_array(WN * wn) ; 00077 extern BOOL cwh_addr_is_section(WN * wn) ; 00078 extern WN * cwh_addr_find_address(WN * wn) ; 00079 extern WN * cwh_addr_temp_section(WN * ad, TY_IDX ty) ; 00080 extern WN * cwh_addr_extent(WN * lb, WN *ub, WN *str); 00081 extern WN * cwh_addr_ubound_from_triplet(WN * triplet); 00082 extern ST * cwh_addr_WN_ST(WN * wn); 00083 extern void cwh_addr_nonc_util(WN **a, WN **b) ; 00084 extern WN * cwh_addr_find_section(WN * awn , enum p_flag flag) ; 00085 extern WN * cwh_addr_mk_ldid(ST *st, OFFSET_64 off, TYPE_ID bt, TY_IDX ty); 00086 extern BOOL cwh_addr_f90_pointer_reference(WN * addr); 00087 00088 00089 typedef struct { OFFSET_64 off ; TY_IDX type ;} FLD_det ; 00090 extern FLD_det cwh_addr_offset(void) ; 00091 00092 extern OPCODE opc_lda; 00093 extern OPCODE opc_call; 00094 extern OPCODE opc_array; 00095 extern OPCODE opc_section; 00096 extern OPCODE opc_triplet; 00097 extern OPCODE opc_src_triplet; 00098 extern OPCODE opc_pint; 00099 extern OPCODE opc_sint; 00100 extern TYPE_ID cwh_addr_char_len_typeid; 00101 extern TYPE_ID cwh_bound_int_typeid; 00102 extern TYPE_ID cwh_doloop_typeid; 00103 extern WN * addr_gen_iload_for_strctfld(WN *); 00104 00105 #define IS_ALTENTRY_TEMP(s) ((ST_class(s) == CLASS_VAR) && \ 00106 (ST_base_idx(s) != ST_st_idx(s)) && \ 00107 (ST_is_return_var(ST_base(s)))) 00108 00109 /* Map for name information on ARRAY nodes */ 00110 00111 extern WN_MAP array_name_map; 00112 #define SET_ARRAY_NAME_MAP(a,m) WN_MAP_Set(array_name_map,(a),(void *) (m)) 00113 #define GET_ARRAY_NAME_MAP(a) ((char *) WN_MAP_Get(array_name_map,(a))) 00114 00115 #endif /* CWH_ADDR_INCLUDED */ 00116