diff --git a/src/emu/sigill_hook.c b/src/emu/sigill_hook.c index 2985358..cad5edc 100644 --- a/src/emu/sigill_hook.c +++ b/src/emu/sigill_hook.c @@ -31,6 +31,7 @@ #include #include #include "lasx_interpret.h" +#include int use_lsx_intrinsics; #ifdef LASX_PROFILE @@ -121,6 +122,10 @@ __attribute__((constructor)) void register_sigill_handler(void) { if (env && atoi(env) != 0) { use_lsx_intrinsics = 0; } + const bool has_lsx = __cpucfg(2) & 0b01000000; + if (!has_lsx) { + use_lsx_intrinsics = 0; + } // 初始化性能统计 perf_stats_init();