File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4343#endif
4444
4545#ifndef WIN32
46- static jmp_buf CPU_state ;
46+ static sigjmp_buf CPU_state ;
4747static void seg_av_handler (int signal_code )
4848{
49- longjmp (CPU_state , signal_code );
49+ siglongjmp (CPU_state , signal_code );
5050}
5151#endif
5252static void ISA_op_illegal (int signal_code )
@@ -522,10 +522,6 @@ void no_LLE(void)
522522}
523523EXPORT void CALL InitiateRSP (RSP_INFO Rsp_Info , pu32 CycleCount )
524524{
525- #ifndef _WIN32
526- int recovered_from_exception ;
527- #endif
528-
529525 if (CycleCount != NULL ) /* cycle-accuracy not doable with today's hosts */
530526 * CycleCount = 0 ;
531527 update_conf (CFG_FILE );
@@ -568,7 +564,7 @@ EXPORT void CALL InitiateRSP(RSP_INFO Rsp_Info, pu32 CycleCount)
568564#ifndef _WIN32
569565 signal (SIGSEGV , seg_av_handler );
570566 for (SR [ra ] = 0 ; SR [ra ] < 0x80000000ul ; SR [ra ] += 0x200000 ) {
571- recovered_from_exception = setjmp (CPU_state );
567+ int recovered_from_exception = sigsetjmp (CPU_state , 1 );
572568 if (recovered_from_exception )
573569 break ;
574570 SR [at ] += DRAM [SR [ra ]];
You can’t perform that action at this time.
0 commit comments