Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

fesupprt.h File Reference

Go to the source code of this file.

Defines

#define disabled_fp_register_fault(arg1, arg2)   fp82_disabled_fp_register_fault(EM_state_type *ps, arg1, arg2)
#define fp_exception_fault(arg1)   fp82_fp_exception_fault(EM_state_type *ps, arg1)
#define fp_exception_trap(arg1)   fp82_fp_exception_trap(EM_state_type *ps, arg1)
#define illegal_operation_fault(arg1)   fp82_illegal_operation_fault(EM_state_type *ps, arg1)
#define check_target_register(arg1, arg2)   fp82_check_target_register(EM_state_type *ps, arg1, arg2)
#define fp_check_target_register(arg1)   fp82_fp_check_target_register(EM_state_type *ps, arg1)
#define GETSTATE_F1(qp, f1, f3, f4, f2)   _GETSTATE_F1(EM_state_type *ps, qp,f1,f3,f4,f2)
#define PUTSTATE_F1(f1)   _PUTSTATE_F1(EM_state_type *ps, f1)
#define GETSTATE_F4(qp, p1, p2, f2, f3)   _GETSTATE_F4(EM_state_type *ps, qp,p1,p2,f2,f3)
#define PUTSTATE_F4(p1, p2)   _PUTSTATE_F4(EM_state_type *ps, p1,p2)
#define GETSTATE_F6(qp, f1, p2, f2, f3)   _GETSTATE_F6(EM_state_type *ps,qp,f1,p2,f2,f3)
#define PUTSTATE_F6(f1, p2)   _PUTSTATE_F6(EM_state_type *ps,f1,p2)
#define GETSTATE_F7(qp, f1, p2, f3)   _GETSTATE_F7(EM_state_type *ps, qp,f1,p2,f3)
#define PUTSTATE_F7(f1, p2)   _PUTSTATE_F7(EM_state_type *ps, f1,p2)
#define GETSTATE_F8(qp, f1, f2, f3)   _GETSTATE_F8(EM_state_type *ps, qp,f1,f2,f3)
#define PUTSTATE_F8(f1)   _PUTSTATE_F8(EM_state_type *ps, f1)
#define GETSTATE_F10(qp, f1, f2)   _GETSTATE_F10(EM_state_type *ps, qp,f1,f2)
#define PUTSTATE_F10(f1)   _PUTSTATE_F10(EM_state_type *ps, f1)
#define get_bit(val, bit)   ((val >> bit) &0x1)
#define EM_initialize_state   fp82_EM_initialize_state
#define fp_software_assistance_required   fp82_fp_software_assistance_required

Functions

void fp82_EM_initialize_state (EM_state_type *ps)
EM_boolean_t fp82_fp_software_assistance_required (EM_state_type *, EM_opcode_type,...)
INLINE void disabled_fp_register_fault (EM_uint_t isr_code, EM_uint_t itype)
INLINE void fp_exception_fault (EM_uint_t isr_code)
INLINE void fp_exception_trap (EM_uint_t isr_code)
INLINE void illegal_operation_fault (EM_uint_t non_rs)
INLINE void check_target_register (EM_uint_t reg_specifier, EM_uint_t itype)
void fp_check_target_register (EM_uint_t reg_specifier)
void GETSTATE_F1 (EM_pred_reg_specifier Pr0, EM_fp_reg_specifier Fr1, EM_fp_reg_specifier Fr3, EM_fp_reg_specifier Fr4, EM_fp_reg_specifier Fr2)
void PUTSTATE_F1 (EM_fp_reg_specifier Fr1)
void GETSTATE_F4 (EM_pred_reg_specifier Pr0, EM_pred_reg_specifier Pr1, EM_pred_reg_specifier Pr2, EM_fp_reg_specifier Fr2, EM_fp_reg_specifier Fr3)
void PUTSTATE_F4 (EM_pred_reg_specifier Pr1, EM_pred_reg_specifier Pr2)
void GETSTATE_F6 (EM_pred_reg_specifier Pr0, EM_fp_reg_specifier Fr1, EM_pred_reg_specifier Pr2, EM_fp_reg_specifier Fr2, EM_fp_reg_specifier Fr3)
void PUTSTATE_F6 (EM_fp_reg_specifier Fr1, EM_pred_reg_specifier Pr2)
void GETSTATE_F7 (EM_pred_reg_specifier Pr0, EM_fp_reg_specifier Fr1, EM_pred_reg_specifier Pr2, EM_fp_reg_specifier Fr3)
void PUTSTATE_F7 (EM_fp_reg_specifier Fr1, EM_pred_reg_specifier Pr2)
void GETSTATE_F8 (EM_pred_reg_specifier Pr0, EM_fp_reg_specifier Fr1, EM_fp_reg_specifier Fr2, EM_fp_reg_specifier Fr3)
void PUTSTATE_F8 (EM_fp_reg_specifier Fr1)
void GETSTATE_F10 (EM_pred_reg_specifier Pr0, EM_fp_reg_specifier Fr1, EM_fp_reg_specifier Fr2)
void PUTSTATE_F10 (EM_fp_reg_specifier Fr1)


Define Documentation

#define check_target_register arg1,
arg2   )     fp82_check_target_register(EM_state_type *ps, arg1, arg2)
 

Definition at line 37 of file fesupprt.h.

#define disabled_fp_register_fault arg1,
arg2   )     fp82_disabled_fp_register_fault(EM_state_type *ps, arg1, arg2)
 

Definition at line 25 of file fesupprt.h.

#define EM_initialize_state   fp82_EM_initialize_state
 

Definition at line 186 of file fesupprt.h.

Referenced by fp_emulate().

#define fp_check_target_register arg1   )     fp82_fp_check_target_register(EM_state_type *ps, arg1)
 

Definition at line 40 of file fesupprt.h.

#define fp_exception_fault arg1   )     fp82_fp_exception_fault(EM_state_type *ps, arg1)
 

Definition at line 28 of file fesupprt.h.

#define fp_exception_trap arg1   )     fp82_fp_exception_trap(EM_state_type *ps, arg1)
 

Definition at line 31 of file fesupprt.h.

#define fp_software_assistance_required   fp82_fp_software_assistance_required
 

Definition at line 188 of file fesupprt.h.

Referenced by fcmp_exception_fault_check(), fcvt_exception_fault_check(), fma_exception_fault_check(), fminmax_exception_fault_check(), fms_fnma_exception_fault_check(), fpcmp_exception_fault_check(), fpcvt_exception_fault_check(), fpma_exception_fault_check(), fpminmax_exception_fault_check(), fpms_fpnma_exception_fault_check(), fprcpa_exception_fault_check(), fprsqrta_exception_fault_check(), frcpa_exception_fault_check(), and frsqrta_exception_fault_check().

#define get_bit val,
bit   )     ((val >> bit) &0x1)
 

Definition at line 175 of file fesupprt.h.

#define GETSTATE_F1 qp,
f1,
f3,
f4,
f2   )     _GETSTATE_F1(EM_state_type *ps, qp,f1,f3,f4,f2)
 

Definition at line 77 of file fesupprt.h.

#define GETSTATE_F10 qp,
f1,
f2   )     _GETSTATE_F10(EM_state_type *ps, qp,f1,f2)
 

Definition at line 92 of file fesupprt.h.

#define GETSTATE_F4 qp,
p1,
p2,
f2,
f3   )     _GETSTATE_F4(EM_state_type *ps, qp,p1,p2,f2,f3)
 

Definition at line 80 of file fesupprt.h.

#define GETSTATE_F6 qp,
f1,
p2,
f2,
f3   )     _GETSTATE_F6(EM_state_type *ps,qp,f1,p2,f2,f3)
 

Definition at line 83 of file fesupprt.h.

#define GETSTATE_F7 qp,
f1,
p2,
f3   )     _GETSTATE_F7(EM_state_type *ps, qp,f1,p2,f3)
 

Definition at line 86 of file fesupprt.h.

#define GETSTATE_F8 qp,
f1,
f2,
f3   )     _GETSTATE_F8(EM_state_type *ps, qp,f1,f2,f3)
 

Definition at line 89 of file fesupprt.h.

#define illegal_operation_fault arg1   )     fp82_illegal_operation_fault(EM_state_type *ps, arg1)
 

Definition at line 34 of file fesupprt.h.

#define PUTSTATE_F1 f1   )     _PUTSTATE_F1(EM_state_type *ps, f1)
 

Definition at line 78 of file fesupprt.h.

#define PUTSTATE_F10 f1   )     _PUTSTATE_F10(EM_state_type *ps, f1)
 

Definition at line 93 of file fesupprt.h.

#define PUTSTATE_F4 p1,
p2   )     _PUTSTATE_F4(EM_state_type *ps, p1,p2)
 

Definition at line 81 of file fesupprt.h.

#define PUTSTATE_F6 f1,
p2   )     _PUTSTATE_F6(EM_state_type *ps,f1,p2)
 

Definition at line 84 of file fesupprt.h.

#define PUTSTATE_F7 f1,
p2   )     _PUTSTATE_F7(EM_state_type *ps, f1,p2)
 

Definition at line 87 of file fesupprt.h.

#define PUTSTATE_F8 f1   )     _PUTSTATE_F8(EM_state_type *ps, f1)
 

Definition at line 90 of file fesupprt.h.


Function Documentation

INLINE void check_target_register EM_uint_t  reg_specifier,
EM_uint_t  itype
 

Definition at line 332 of file fesupprt.c.

References exit, and FP_EMULATION_ERROR0.

00333 { 00334 if(reg_specifier == 0) { 00335 #ifdef IN_KERNEL 00336 FP_EMULATION_ERROR0 ("fp_check_target_register () Internal Error\n"); 00337 #else 00338 printf ("fp_check_target_register () Internal Error\n"); 00339 exit (1); 00340 #endif 00341 } 00342 }

INLINE void disabled_fp_register_fault EM_uint_t  isr_code,
EM_uint_t  itype
 

Definition at line 284 of file fesupprt.c.

References exit, and FP_EMULATION_ERROR0.

00285 { 00286 #ifdef IN_KERNEL 00287 FP_EMULATION_ERROR0 ("disabled_fp_register_fault () Internal Error\n"); 00288 #else 00289 printf ("disabled_fp_register_fault () Internal Error\n"); 00290 exit (1); 00291 #endif 00292 }

void fp82_EM_initialize_state EM_state_type ps  ) 
 

Definition at line 185 of file fesupprt.c.

References EM_int_t, EM_NUM_PR, fp82_default_fp_exception_fault(), fp82_default_fp_exception_trap(), FPSR, FR, GR, MAX_REAL_FR_INDEX, MAX_REAL_GR_INDEX, PR, PSR, rc_rn, sf_double_extended, EM_state_struct::state_fp82_fp_exception_fault, EM_state_struct::state_fp82_fp_exception_trap, and EM_state_struct::state_MERCED_RTL.

00185 { 00186 EM_int_t i; 00187 00188 PSR.be = 0; 00189 PSR.dfl = 0; 00190 PSR.dfh = 0; 00191 PSR.mfl = 0; 00192 PSR.mfh = 0; 00193 00194 FPSR.traps_vd = 1; 00195 FPSR.traps_dd = 1; 00196 FPSR.traps_zd = 1; 00197 FPSR.traps_od = 1; 00198 FPSR.traps_ud = 1; 00199 FPSR.traps_id = 1; 00200 00201 FPSR.sf0_controls_ftz = 0; 00202 FPSR.sf0_controls_wre = 1; 00203 FPSR.sf0_controls_pc = sf_double_extended; 00204 FPSR.sf0_controls_rc = rc_rn; 00205 FPSR.sf0_controls_td = 0; 00206 FPSR.sf0_flags_v = 0; 00207 FPSR.sf0_flags_d = 0; 00208 FPSR.sf0_flags_z = 0; 00209 FPSR.sf0_flags_o = 0; 00210 FPSR.sf0_flags_u = 0; 00211 FPSR.sf0_flags_i = 0; 00212 00213 FPSR.sf1_controls_ftz = 0; 00214 FPSR.sf1_controls_wre = 1; 00215 FPSR.sf1_controls_pc = sf_double_extended; 00216 FPSR.sf1_controls_rc = rc_rn; 00217 FPSR.sf1_controls_td = 0; 00218 FPSR.sf1_flags_v = 0; 00219 FPSR.sf1_flags_d = 0; 00220 FPSR.sf1_flags_z = 0; 00221 FPSR.sf1_flags_o = 0; 00222 FPSR.sf1_flags_u = 0; 00223 FPSR.sf1_flags_i = 0; 00224 00225 FPSR.sf2_controls_ftz = 0; 00226 FPSR.sf2_controls_wre = 1; 00227 FPSR.sf2_controls_pc = sf_double_extended; 00228 FPSR.sf2_controls_rc = rc_rn; 00229 FPSR.sf2_controls_td = 0; 00230 FPSR.sf2_flags_v = 0; 00231 FPSR.sf2_flags_d = 0; 00232 FPSR.sf2_flags_z = 0; 00233 FPSR.sf2_flags_o = 0; 00234 FPSR.sf2_flags_u = 0; 00235 FPSR.sf2_flags_i = 0; 00236 00237 FPSR.sf3_controls_ftz = 0; 00238 FPSR.sf3_controls_wre = 1; 00239 FPSR.sf3_controls_pc = sf_double_extended; 00240 FPSR.sf3_controls_rc = rc_rn; 00241 FPSR.sf3_controls_td = 0; 00242 FPSR.sf3_flags_v = 0; 00243 FPSR.sf3_flags_d = 0; 00244 FPSR.sf3_flags_z = 0; 00245 FPSR.sf3_flags_o = 0; 00246 FPSR.sf3_flags_u = 0; 00247 FPSR.sf3_flags_i = 0; 00248 FPSR.reserved = 0; 00249 00250 PR[0] = 1; 00251 for (i=1;i<EM_NUM_PR;i++) 00252 PR[i] = 0; 00253 00254 ps->state_MERCED_RTL = 0; 00255 00256 FR[0] = FP_ZERO; 00257 FR[1] = FP_ONE; 00258 00259 for (i=2;i<MAX_REAL_FR_INDEX;i++) 00260 FR[i] = FP_ZERO; 00261 00262 for (i=0;i<MAX_REAL_GR_INDEX;i++) { 00263 GR[i].value = 0; 00264 GR[i].nat = 0; 00265 } 00266 00267 ps->state_fp82_fp_exception_fault = fp82_default_fp_exception_fault; 00268 ps->state_fp82_fp_exception_trap = fp82_default_fp_exception_trap; 00269 }

EM_boolean_t fp82_fp_software_assistance_required EM_state_type ,
EM_opcode_type  ,
  ...
 

Definition at line 275 of file fesupprt.c.

00277 { 00278 return(0); 00279 }

void fp_check_target_register EM_uint_t  reg_specifier  ) 
 

Definition at line 345 of file fesupprt.c.

References exit, and FP_EMULATION_ERROR0.

00346 { 00347 if( (reg_specifier == 0) || (reg_specifier == 1) ){ 00348 #ifdef IN_KERNEL 00349 FP_EMULATION_ERROR0 ("fp_check_target_register () Internal Error\n") 00350 #else 00351 printf ("fp_check_target_register () Internal Error\n"); 00352 exit (1); 00353 #endif 00354 } 00355 }

INLINE void fp_exception_fault EM_uint_t  isr_code  ) 
 

Definition at line 296 of file fesupprt.c.

References FR, GR, and PR.

00297 { 00298 00299 PR[0] = 1; 00300 GR[0].value = 0; 00301 GR[0].nat = 0; 00302 FR[0] = FP_ZERO; 00303 FR[1] = FP_ONE; 00304 00305 ps->state_fp82_fp_exception_fault((EM_state_type *)ps, isr_code); 00306 00307 }

INLINE void fp_exception_trap EM_uint_t  isr_code  ) 
 

Definition at line 310 of file fesupprt.c.

00311 { 00312 00313 isr_code |= 0x00000001; 00314 00315 ps->state_fp82_fp_exception_trap((EM_state_type *)ps, isr_code); 00316 00317 }

void GETSTATE_F1 EM_pred_reg_specifier  Pr0,
EM_fp_reg_specifier  Fr1,
EM_fp_reg_specifier  Fr3,
EM_fp_reg_specifier  Fr4,
EM_fp_reg_specifier  Fr2
 

Definition at line 46 of file fesupprt.c.

00051 { 00052 00053 }

void GETSTATE_F10 EM_pred_reg_specifier  Pr0,
EM_fp_reg_specifier  Fr1,
EM_fp_reg_specifier  Fr2
 

Definition at line 145 of file fesupprt.c.

References SIGNED_FORM, TRUNC_FORM, and UNSIGNED_FORM.

00148 { 00149 00150 SIGNED_FORM = 0; 00151 TRUNC_FORM = 0; 00152 UNSIGNED_FORM = 0; 00153 }

void GETSTATE_F4 EM_pred_reg_specifier  Pr0,
EM_pred_reg_specifier  Pr1,
EM_pred_reg_specifier  Pr2,
EM_fp_reg_specifier  Fr2,
EM_fp_reg_specifier  Fr3
 

Definition at line 66 of file fesupprt.c.

00071 { 00072 }

void GETSTATE_F6 EM_pred_reg_specifier  Pr0,
EM_fp_reg_specifier  Fr1,
EM_pred_reg_specifier  Pr2,
EM_fp_reg_specifier  Fr2,
EM_fp_reg_specifier  Fr3
 

Definition at line 86 of file fesupprt.c.

00091 { 00092 }

void GETSTATE_F7 EM_pred_reg_specifier  Pr0,
EM_fp_reg_specifier  Fr1,
EM_pred_reg_specifier  Pr2,
EM_fp_reg_specifier  Fr3
 

Definition at line 107 of file fesupprt.c.

00111 { 00112 }

void GETSTATE_F8 EM_pred_reg_specifier  Pr0,
EM_fp_reg_specifier  Fr1,
EM_fp_reg_specifier  Fr2,
EM_fp_reg_specifier  Fr3
 

Definition at line 127 of file fesupprt.c.

00131 { 00132 }

INLINE void illegal_operation_fault EM_uint_t  non_rs  ) 
 

Definition at line 321 of file fesupprt.c.

References exit, and FP_EMULATION_ERROR0.

00322 { 00323 #ifdef IN_KERNEL 00324 FP_EMULATION_ERROR0 ("illegal_operation_fault () Internal Error\n"); 00325 #else 00326 printf ("illegal_operation_fault () Internal Error\n"); 00327 exit (1); 00328 #endif 00329 }

void PUTSTATE_F1 EM_fp_reg_specifier  Fr1  ) 
 

Definition at line 56 of file fesupprt.c.

References RESTORE_CONSTANTS.

00057 { 00058 00059 RESTORE_CONSTANTS; 00060 }

void PUTSTATE_F10 EM_fp_reg_specifier  Fr1  ) 
 

Definition at line 156 of file fesupprt.c.

References RESTORE_CONSTANTS.

00157 { 00158 00159 RESTORE_CONSTANTS; 00160 }

void PUTSTATE_F4 EM_pred_reg_specifier  Pr1,
EM_pred_reg_specifier  Pr2
 

Definition at line 75 of file fesupprt.c.

References RESTORE_CONSTANTS.

00077 { 00078 00079 RESTORE_CONSTANTS; 00080 }

void PUTSTATE_F6 EM_fp_reg_specifier  Fr1,
EM_pred_reg_specifier  Pr2
 

Definition at line 95 of file fesupprt.c.

References RESTORE_CONSTANTS.

00097 { 00098 00099 RESTORE_CONSTANTS; 00100 }

void PUTSTATE_F7 EM_fp_reg_specifier  Fr1,
EM_pred_reg_specifier  Pr2
 

Definition at line 116 of file fesupprt.c.

References RESTORE_CONSTANTS.

00118 { 00119 00120 RESTORE_CONSTANTS; 00121 }

void PUTSTATE_F8 EM_fp_reg_specifier  Fr1  ) 
 

Definition at line 135 of file fesupprt.c.

References RESTORE_CONSTANTS.

00136 { 00137 00138 RESTORE_CONSTANTS; 00139 }


Generated on Sat May 15 19:43:39 2004 for test by doxygen 1.3.7