--- uae/src/md-i386-gcc/support.c 2018/04/24 16:42:54 1.1.1.3 +++ uae/src/md-i386-gcc/support.c 2018/04/24 16:48:07 1.1.1.5 @@ -14,6 +14,7 @@ #include "options.h" #include "machdep/m68k.h" #include "events.h" +#include "custom.h" #ifndef USE_UNDERSCORE #define LARGE_ALIGNMENT ".align 16\n" @@ -237,6 +238,9 @@ static RETSIGTYPE alarmhandler(int foo) } } +#include +jmp_buf catch_test; + #ifdef __cplusplus static RETSIGTYPE illhandler(...) #else @@ -244,14 +248,18 @@ static RETSIGTYPE illhandler(int foo) #endif { rpt_available = 0; + longjmp(catch_test,1); } void machdep_init (void) { rpt_available = 1; + fprintf (stderr,"Testing the RDTSC instruction ... "); signal (SIGILL, illhandler); - read_processor_time (); + if (setjmp (catch_test) == 0) + read_processor_time (); signal (SIGILL, SIG_DFL); + fprintf (stderr,"done.\n"); if (! rpt_available) { fprintf (stderr, "Your processor does not support the RDTSC instruction.\n"); return; @@ -269,7 +277,7 @@ void machdep_init (void) usleep (1000000); fprintf (stderr, "ok - %.2f BogoMIPS\n", ((double)best_time / 1000000), best_time); - vsynctime = best_time / 50; + syncbase = best_time; } #endif