File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,7 @@ static void
244244cpu_hardfloat (union param_val val , void * dat )
245245{
246246 config .cpu .hardfloat = val .int_val ;
247+ cpu_state .sprs [SPR_CPUCFGR ] |= SPR_CPUCFGR_OF32S ;
247248}
248249/*---------------------------------------------------------------------------*/
249250/*!Register the functions to handle a section cpu
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ except_handle (oraddr_t except, oraddr_t ea)
9999 cpu_state .pc - (cpu_state .delay_insn ? 4 : 0 );
100100 break ;
101101 /* EPCR is loaded with address of next not-yet-executed instruction */
102+ case EXCEPT_FPE :
102103 case EXCEPT_SYSCALL :
103104 cpu_state .sprs [SPR_EPCR_BASE ] =
104105 (cpu_state .pc + 4 ) - (cpu_state .delay_insn ? 4 : 0 );
Original file line number Diff line number Diff line change @@ -1113,12 +1113,10 @@ float_set_flags ()
11131113 !!(float_exception_flags & float_flag_underflow),
11141114 !!(float_exception_flags & float_flag_inexact));
11151115 */
1116- // TODO: Call FP exception is FPEE set and any of the flags were set
1117- /*
1118- if ((cpu_state.sprs[SPR_FPCSR] & SPR_FPCSR_FPEE) &
1119- (|(cpu_state.sprs[SPR_FPCSR] & SPR_FPCSR_ALLF)))
1120- except_handle (EXCEPT_FPE, cpu_state.iqueue.insn_addr);
1121- */
1116+ // Call FP exception if FPEE set and any of the flags were set
1117+ if ((cpu_state .sprs [SPR_FPCSR ] & SPR_FPCSR_FPEE ) &&
1118+ (cpu_state .sprs [SPR_FPCSR ] & SPR_FPCSR_ALLF ))
1119+ except_handle (EXCEPT_FPE , cpu_state .sprs [SPR_EEAR_BASE ]);
11221120 // Now clear softfloat's flags:
11231121 float_exception_flags = 0 ;
11241122
You can’t perform that action at this time.
0 commit comments