From f405c5abdbd321b68b17b1d59905a7ee178976ff Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 21 Apr 2014 17:34:57 -0700 Subject: [PATCH] Bug 998158 - SpiderMonkey: Use specific feature tests instead of calling getSSEState() r=sstangl --- js/src/assembler/assembler/MacroAssemblerX86Common.h | 2 ++ js/src/jit/shared/Assembler-x86-shared.h | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/js/src/assembler/assembler/MacroAssemblerX86Common.h b/js/src/assembler/assembler/MacroAssemblerX86Common.h index dcb3589047c0..2faf631b9271 100644 --- a/js/src/assembler/assembler/MacroAssemblerX86Common.h +++ b/js/src/assembler/assembler/MacroAssemblerX86Common.h @@ -1412,6 +1412,7 @@ private: #endif } + public: #if WTF_CPU_X86 #if WTF_OS_MAC_OS_X @@ -1509,6 +1510,7 @@ private: return s_sseCheckState >= HasSSE4_2; } + private: #ifdef DEBUG static bool s_floatingPointDisabled; static bool s_SSE3Disabled; diff --git a/js/src/jit/shared/Assembler-x86-shared.h b/js/src/jit/shared/Assembler-x86-shared.h index 9c5c1b82df7d..25d55497842e 100644 --- a/js/src/jit/shared/Assembler-x86-shared.h +++ b/js/src/jit/shared/Assembler-x86-shared.h @@ -781,14 +781,16 @@ class AssemblerX86Shared masm.int3(); } +#ifdef DEBUG static bool HasSSE2() { - return JSC::MacroAssembler::getSSEState() >= JSC::MacroAssembler::HasSSE2; + return JSC::MacroAssembler::isSSE2Present(); } +#endif static bool HasSSE3() { - return JSC::MacroAssembler::getSSEState() >= JSC::MacroAssembler::HasSSE3; + return JSC::MacroAssembler::isSSE3Present(); } static bool HasSSE41() { - return JSC::MacroAssembler::getSSEState() >= JSC::MacroAssembler::HasSSE4_1; + return JSC::MacroAssembler::isSSE41Present(); } // The below cmpl methods switch the lhs and rhs when it invokes the