diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-05-02 09:11:43 +0000 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-05-02 09:11:43 +0000 |
| commit | d24cbaf556816e6569b9fe47f6dc3446465db3f4 (patch) | |
| tree | efe1703f56cc0f14d2aa18a2048db3b3ee5c7cd4 /src | |
| parent | cbf71f678aea5ebb463daded486a45a267647be2 (diff) | |
| download | box64-d24cbaf556816e6569b9fe47f6dc3446465db3f4.tar.gz box64-d24cbaf556816e6569b9fe47f6dc3446465db3f4.zip | |
[RV64_DYNAREC] Improved a bit the rv64 extension detection code
Diffstat (limited to 'src')
| -rw-r--r-- | src/rv64detect.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rv64detect.c b/src/rv64detect.c index 5e84423b..9976d1d7 100644 --- a/src/rv64detect.c +++ b/src/rv64detect.c @@ -22,15 +22,15 @@ static int Check(void* block) // Clear instruction cache __clear_cache(block, block+box64_pagesize); // Setup SIGILL signal handler - signal(SIGILL, detect_sigill); + __sighandler_t old = signal(SIGILL, detect_sigill); if(sigsetjmp(sigbuf, 1)) { // didn't work, extension not present - signal(SIGILL, SIG_DFL); + signal(SIGILL, old); return 0; } ((vFii_t)block)(0, 1); // done... - signal(SIGILL, SIG_DFL); + signal(SIGILL, old); return 1; } |