From a256b245cc26bdea08c6f705b93b9747001129ce Mon Sep 17 00:00:00 2001 From: nihui Date: Sun, 21 Apr 2024 13:24:02 +0800 Subject: [PATCH] clear mmx state after mmx procedures, fix #94 (#95) --- ruapu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruapu.h b/ruapu.h index 982470b..a1a4488 100644 --- a/ruapu.h +++ b/ruapu.h @@ -183,7 +183,7 @@ static int ruapu_detect_isa(ruapu_some_inst some_inst) #endif // defined _WIN32 #if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64) -RUAPU_INSTCODE(mmx, 0x0f, 0xdb, 0xc0) // pand mm0,mm0 +RUAPU_INSTCODE(mmx, 0x0f, 0xdb, 0xc0, 0x0f, 0x77) // pand mm0,mm0 + emms RUAPU_INSTCODE(sse, 0x0f, 0x54, 0xc0) // andps xmm0,xmm0 RUAPU_INSTCODE(sse2, 0x66, 0x0f, 0xfe, 0xc0) // paddd xmm0,xmm0 RUAPU_INSTCODE(sse3, 0xf2, 0x0f, 0x7c, 0xc0) // haddps xmm0,xmm0