Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
00001 00002 /* 00003 00004 Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00005 00006 This program is free software; you can redistribute it and/or modify it 00007 under the terms of version 2 of the GNU General Public License as 00008 published by the Free Software Foundation. 00009 00010 This program is distributed in the hope that it would be useful, but 00011 WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00013 00014 Further, this software is distributed without any warranty that it is 00015 free of the rightful claim of any third person regarding infringement 00016 or the like. Any license provided herein, whether implied or 00017 otherwise, applies only to this software file. Patent licenses, if 00018 any, provided herein do not apply to combinations of this program with 00019 other software, or any other product whatsoever. 00020 00021 You should have received a copy of the GNU General Public License along 00022 with this program; if not, write the Free Software Foundation, Inc., 59 00023 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00024 00025 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00026 Mountain View, CA 94043, or: 00027 00028 http://www.sgi.com 00029 00030 For further information regarding this notice, see: 00031 00032 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00033 00034 */ 00035 00036 /* 00037 * ========================================================================== 00038 * 00039 * Module : unwind.h -- IA64 unwind producer header file. 00040 * Normally used only by compiler, assembler 00041 * 00042 * ========================================================================== 00043 */ 00044 00045 #ifndef __SYS_IA64_UNWINDP_H 00046 #define __SYS_IA64_UNWINDP_H 00047 00048 #include <sys/ia64/unwind_ia64.h> 00049 00050 #ifdef __cplusplus 00051 extern "C" { 00052 #endif 00053 00054 /* producer API */ 00055 00056 /* functionality for general operations */ 00057 __unw_error_t unwind_info_initialize(__unw_info_t **, 00058 __unw_addr_t /* start addr */, 00059 __unw_addr_t /* end addr */); 00060 __unw_error_t unwind_info_finalize(__unw_info_t *); 00061 __unw_error_t unwind_cleanup(void); 00062 00063 /* unwind table and/or unwind info dumping into elf sections */ 00064 __unw_error_t unwind_dump2elf(char *, uint64_t, 00065 char *, uint64_t, void *); 00066 00067 /* functionality for the unwind descriptors that record */ 00068 /* the (prologue/body) region headers */ 00069 __unw_error_t unwind_info_add_prologue_header(__unw_info_t *, 00070 uint64_t /* region size */); 00071 __unw_error_t unwind_info_add_prologue_gr_header(__unw_info_t *, 00072 uint64_t /* region size */, 00073 char mask /* reg mask */, 00074 uint32_t /* gr no */); 00075 __unw_error_t unwind_info_add_body_header(__unw_info_t *, 00076 uint64_t /* region size */); 00077 00078 /* functionality for the unwind descriptors in the prologue that record */ 00079 /* the state of the stack pointer and/or the memory stack frame size */ 00080 __unw_error_t unwind_info_add_prologue_mem_stack_f_info(__unw_info_t *, 00081 uint64_t /* when */, 00082 uint64_t /* fixed frame size */); 00083 __unw_error_t unwind_info_add_prologue_mem_stack_v_info(__unw_info_t *, 00084 uint64_t /* when */); 00085 __unw_error_t unwind_info_add_prologue_psp_gr_info(__unw_info_t *, 00086 uint32_t /* gr no */); 00087 __unw_error_t unwind_info_add_prologue_psp_sprel_info(__unw_info_t *, 00088 uint64_t /* sp offset */); 00089 00090 /* functionality for the unwind descriptors in the prologue that record */ 00091 /* the state of the return pointer */ 00092 __unw_error_t unwind_info_add_prologue_rp_when_info(__unw_info_t *, 00093 uint64_t /* when */); 00094 __unw_error_t unwind_info_add_prologue_rp_gr_info(__unw_info_t *, 00095 uint32_t /* gr no */); 00096 __unw_error_t unwind_info_add_prologue_rp_br_info(__unw_info_t *, 00097 uint32_t /* alternate br no */); 00098 __unw_error_t unwind_info_add_prologue_rp_psprel_info(__unw_info_t *, 00099 uint64_t /* psp offset */); 00100 __unw_error_t unwind_info_add_prologue_rp_sprel_info(__unw_info_t *, 00101 uint64_t /* sp offset */); 00102 00103 /* functionality for the unwind descriptors in the prologue that record */ 00104 /* the state of the previous function state register */ 00105 __unw_error_t unwind_info_add_prologue_pfs_when_info(__unw_info_t *, 00106 uint64_t /* when */); 00107 __unw_error_t unwind_info_add_prologue_pfs_gr_info(__unw_info_t *, 00108 uint32_t /* gr no */); 00109 __unw_error_t unwind_info_add_prologue_pfs_psprel_info(__unw_info_t *, 00110 uint64_t /* psp offset */); 00111 __unw_error_t unwind_info_add_prologue_pfs_sprel_info(__unw_info_t *, 00112 uint64_t /* sp offset */); 00113 00114 /* functionality for the unwind descriptors in the prologue that record */ 00115 /* the state of the preserved predicates */ 00116 __unw_error_t unwind_info_add_prologue_preds_when_info(__unw_info_t *, 00117 uint64_t /* when */); 00118 __unw_error_t unwind_info_add_prologue_preds_gr_info(__unw_info_t *, 00119 uint32_t /* gr no */); 00120 __unw_error_t unwind_info_add_prologue_preds_psprel_info(__unw_info_t *, 00121 uint64_t /* psp offset */); 00122 __unw_error_t unwind_info_add_prologue_preds_sprel_info(__unw_info_t *, 00123 uint64_t /* sp offset */); 00124 00125 /* functionality for the unwind descriptors in the prologue that record */ 00126 /* the state of the general, floating-point and branch registers */ 00127 __unw_error_t unwind_info_add_prologue_fr_mem_info(__unw_info_t *, 00128 uint32_t /* fr mask */); 00129 __unw_error_t unwind_info_add_prologue_frgr_mem_info(__unw_info_t *, 00130 uint32_t /* gr mask */, 00131 uint32_t /* fr mask */); 00132 __unw_error_t unwind_info_add_prologue_gr_gr_info(__unw_info_t *, 00133 uint32_t /* gr mask */, 00134 uint32_t /* gr no */); 00135 __unw_error_t unwind_info_add_prologue_gr_mem_info(__unw_info_t *, 00136 uint32_t /* gr mask */); 00137 __unw_error_t unwind_info_add_prologue_br_mem_info(__unw_info_t *, 00138 uint32_t /* br mask */); 00139 __unw_error_t unwind_info_add_prologue_br_gr_info(__unw_info_t *, 00140 uint32_t /* br mask */, 00141 uint32_t /* gr no */); 00142 __unw_error_t unwind_info_add_prologue_spill_base_info(__unw_info_t *, 00143 uint64_t /* psp offset */); 00144 __unw_error_t unwind_info_add_prologue_spill_mask_info(__unw_info_t *, 00145 void * /* pointer to spill mask */, 00146 uint64_t /* size of spill mask */); 00147 00148 /* functionality for the unwind descriptors in the prologue that record */ 00149 /* the state of the user NaT collection register */ 00150 __unw_error_t unwind_info_add_prologue_unat_when_info(__unw_info_t *, 00151 uint64_t /* when */); 00152 __unw_error_t unwind_info_add_prologue_unat_gr_info(__unw_info_t *, 00153 uint32_t /* gr no */); 00154 __unw_error_t unwind_info_add_prologue_unat_psprel_info(__unw_info_t *, 00155 uint64_t /* psp offset */); 00156 __unw_error_t unwind_info_add_prologue_unat_sprel_info(__unw_info_t *, 00157 uint64_t /* sp offset */); 00158 00159 /* functionality for the unwind descriptors in the prologue that record */ 00160 /* the state of the loop counter register */ 00161 __unw_error_t unwind_info_add_prologue_lc_when_info(__unw_info_t *, 00162 uint64_t /* when */); 00163 __unw_error_t unwind_info_add_prologue_lc_gr_info(__unw_info_t *, 00164 uint32_t /* gr no */); 00165 __unw_error_t unwind_info_add_prologue_lc_psprel_info(__unw_info_t *, 00166 uint64_t /* psp offset */); 00167 __unw_error_t unwind_info_add_prologue_lc_sprel_info(__unw_info_t *, 00168 uint64_t /* sp offset */); 00169 00170 /* functionality for the unwind descriptors in the prologue that record */ 00171 /* the state of the floating-point status register */ 00172 __unw_error_t unwind_info_add_prologue_fpsr_when_info(__unw_info_t *, 00173 uint64_t /* when */); 00174 __unw_error_t unwind_info_add_prologue_fpsr_gr_info(__unw_info_t *, 00175 uint32_t /* gr no */); 00176 __unw_error_t unwind_info_add_prologue_fpsr_psprel_info(__unw_info_t *, 00177 uint64_t /* psp offset */); 00178 __unw_error_t unwind_info_add_prologue_fpsr_sprel_info(__unw_info_t *, 00179 uint64_t /* sp offset */); 00180 00181 /* functionality for the unwind descriptors in the prologue that record */ 00182 /* the state of the primary unat collection */ 00183 __unw_error_t unwind_info_add_prologue_priunat_when_info(__unw_info_t *, 00184 uint64_t /* when */); 00185 __unw_error_t unwind_info_add_prologue_priunat_gr_info(__unw_info_t *, 00186 uint32_t /* gr no */); 00187 __unw_error_t unwind_info_add_prologue_priunat_psprel_info(__unw_info_t *, 00188 uint64_t /* psp offset */); 00189 __unw_error_t unwind_info_add_prologue_priunat_sprel_info(__unw_info_t *, 00190 uint64_t /* sp offset */); 00191 00192 /* functionality for the unwind descriptors in the prologue that record */ 00193 /* the state of the backing store */ 00194 __unw_error_t unwind_info_add_prologue_bsp_when_info(__unw_info_t *, 00195 uint64_t /* when */); 00196 __unw_error_t unwind_info_add_prologue_bsp_gr_info(__unw_info_t *, 00197 uint32_t /* gr no */); 00198 __unw_error_t unwind_info_add_prologue_bsp_psprel_info(__unw_info_t *, 00199 uint64_t /* psp offset */); 00200 __unw_error_t unwind_info_add_prologue_bsp_sprel_info(__unw_info_t *, 00201 uint64_t /* sp offset */); 00202 __unw_error_t unwind_info_add_prologue_bspstore_when_info(__unw_info_t *, 00203 uint64_t /* when */); 00204 __unw_error_t unwind_info_add_prologue_bspstore_gr_info(__unw_info_t *, 00205 uint32_t /* gr no */); 00206 __unw_error_t unwind_info_add_prologue_bspstore_psprel_info(__unw_info_t *, 00207 uint64_t /* psp offset */); 00208 __unw_error_t unwind_info_add_prologue_bspstore_sprel_info(__unw_info_t *, 00209 uint64_t /* sp offset */); 00210 __unw_error_t unwind_info_add_prologue_rnat_when_info(__unw_info_t *, 00211 uint64_t /* when */); 00212 __unw_error_t unwind_info_add_prologue_rnat_gr_info(__unw_info_t *, 00213 uint32_t /* gr no */); 00214 __unw_error_t unwind_info_add_prologue_rnat_psprel_info(__unw_info_t *, 00215 uint64_t /* psp offset */); 00216 __unw_error_t unwind_info_add_prologue_rnat_sprel_info(__unw_info_t *, 00217 uint64_t /* sp offset */); 00218 00219 /* functionality (overall) for the unwind descriptors in the prologue that record */ 00220 /* general-purpose info (most of the above functionality combined) */ 00221 __unw_error_t unwind_info_add_prologue_info_reg(__unw_info_t *, 00222 uint32_t /* reg class */, 00223 uint32_t /* reg no */, 00224 uint64_t /* when */, 00225 uint32_t /* reg class */, 00226 uint32_t /* reg no */); 00227 __unw_error_t unwind_info_add_prologue_info_sp_offset(__unw_info_t *, 00228 uint32_t /* reg class */, 00229 uint32_t /* reg no */, 00230 uint64_t /* when */, 00231 uint64_t /* sp offset */); 00232 __unw_error_t unwind_info_add_prologue_info_psp_offset(__unw_info_t *, 00233 uint32_t /* reg class */, 00234 uint32_t /* reg no */, 00235 uint64_t /* when */, 00236 uint64_t /* psp offset */); 00237 __unw_error_t unwind_info_add_prologue_info_fixed_value(__unw_info_t *, 00238 uint32_t /* reg class */, 00239 uint32_t /* reg no */, 00240 uint64_t /* when */, 00241 uint64_t /* fixed value */); 00242 00243 /* functionality (overall) for the unwind descriptors in the body that record */ 00244 /* general-purpose info (most of the above functionality combined) */ 00245 __unw_error_t unwind_info_add_body_info_restore (__unw_info_t *, 00246 uint32_t /* reg class */, 00247 uint32_t /* reg no */, 00248 uint64_t /* when */); 00249 __unw_error_t unwind_info_add_body_info_reg (__unw_info_t *, 00250 uint32_t /* reg class */, 00251 uint32_t /* reg no */, 00252 uint64_t /* when */, 00253 uint32_t /* reg class */, 00254 uint32_t /* reg no */); 00255 __unw_error_t unwind_info_add_body_info_sp_offset(__unw_info_t *, 00256 uint32_t /* reg class */, 00257 uint32_t /* reg no */, 00258 uint64_t /* when */, 00259 uint64_t /* sp offset */); 00260 __unw_error_t unwind_info_add_body_info_psp_offset(__unw_info_t *, 00261 uint32_t /* reg class */, 00262 uint32_t /* reg no */, 00263 uint64_t /* when */, 00264 uint64_t /* psp offset */); 00265 00266 00267 /* functionality for the unwind descriptors in the body */ 00268 /* that record the epilogue */ 00269 __unw_error_t unwind_info_add_body_epilogue_info(__unw_info_t *, 00270 uint64_t /* when */, 00271 uint64_t /* count for nested */ 00272 /* shrink-wrap regions */); 00273 00274 /* functionality for the unwind descriptors in the body */ 00275 /* that record body label state */ 00276 __unw_error_t unwind_info_add_body_label_state_info(__unw_info_t *, 00277 uint64_t /* label */); 00278 00279 /* functionality for the unwind descriptors in the body */ 00280 /* that record body copy state */ 00281 __unw_error_t unwind_info_add_body_copy_state_info(__unw_info_t *, 00282 uint64_t /* label */); 00283 00284 /* functionality to add personality routine */ 00285 __unw_error_t unwind_info_add_personality_routine_info(__unw_info_t *, 00286 __unw_addr_t /* gp-relative offset of personality routine */, 00287 uint32_t /* ehandler flag */, uint32_t /* uhandler flag */); 00288 00289 /* functionality to add language-specific data */ 00290 __unw_error_t unwind_info_add_language_specific_info(__unw_info_t *, 00291 void * /* pointer to data */, 00292 uint64_t /* size of data */); 00293 00294 00295 #ifdef __cplusplus 00296 } 00297 #endif 00298 00299 #endif