Changeset 243989 in webkit
- Timestamp:
- Apr 8, 2019 3:16:22 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CMakeLists.txt
r243441 r243989 115 115 endif () 116 116 117 #--------------------------- 118 # Make sure SSE2 is present. 119 #--------------------------- 120 if (WTF_CPU_X86) 121 include(FindSSE2) 122 if (NOT SSE2_SUPPORT_FOUND) 123 message(FATAL_ERROR "SSE2 support is required to compile WebKit") 124 endif () 125 endif () 126 117 127 # ----------------------------------------------------------------------------- 118 128 # Determine the operating system -
trunk/ChangeLog
r243934 r243989 1 2019-04-08 Xan Lopez <xan@igalia.com> 2 3 [CMake] Detect SSE2 at compile time 4 https://bugs.webkit.org/show_bug.cgi?id=196488 5 6 Reviewed by Carlos Garcia Campos. 7 8 * CMakeLists.txt: Use FindSSE2.cmake to detect SSE2 support. 9 * Source/cmake/FindSSE2.cmake: Added. 10 1 11 2019-04-05 Commit Queue <commit-queue@webkit.org> 2 12 -
trunk/Source/JavaScriptCore/ChangeLog
r243967 r243989 1 2019-04-08 Xan Lopez <xan@igalia.com> 2 3 [CMake] Detect SSE2 at compile time 4 https://bugs.webkit.org/show_bug.cgi?id=196488 5 6 Reviewed by Carlos Garcia Campos. 7 8 * assembler/MacroAssemblerX86Common.cpp: Remove unnecessary (and 9 incorrect) static_assert. 10 1 11 2019-04-07 Michael Saboff <msaboff@apple.com> 2 12 -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp
r243293 r243989 168 168 static_assert(sizeof(Probe::State) == PROBE_SIZE, "Probe::State::size's matches ctiMasmProbeTrampoline"); 169 169 static_assert((PROBE_EXECUTOR_OFFSET + PTR_SIZE) <= (PROBE_SIZE + OUT_SIZE), "Must have room after ProbeContext to stash the probe handler"); 170 171 #if CPU(X86)172 // SSE2 is a hard requirement on x86.173 static_assert(isSSE2Present(), "SSE2 support is required in JavaScriptCore");174 #endif175 170 176 171 #undef PROBE_OFFSETOF … … 793 788 { 794 789 CPUID cpuid = getCPUID(0x1); 795 s_sse2CheckState = (cpuid[3] & (1 << 26)) ? CPUIDCheckState::Set : CPUIDCheckState::Clear;796 790 s_sse4_1CheckState = (cpuid[2] & (1 << 19)) ? CPUIDCheckState::Set : CPUIDCheckState::Clear; 797 791 s_sse4_2CheckState = (cpuid[2] & (1 << 20)) ? CPUIDCheckState::Set : CPUIDCheckState::Clear; … … 810 804 } 811 805 812 MacroAssemblerX86Common::CPUIDCheckState MacroAssemblerX86Common::s_sse2CheckState = CPUIDCheckState::NotChecked;813 806 MacroAssemblerX86Common::CPUIDCheckState MacroAssemblerX86Common::s_sse4_1CheckState = CPUIDCheckState::NotChecked; 814 807 MacroAssemblerX86Common::CPUIDCheckState MacroAssemblerX86Common::s_sse4_2CheckState = CPUIDCheckState::NotChecked; -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
r243293 r243989 4198 4198 #endif 4199 4199 4200 #if CPU(X86)4201 #if OS(MAC_OS_X)4202 4203 // All X86 Macs are guaranteed to support at least SSE2,4204 static bool isSSE2Present()4205 {4206 return true;4207 }4208 4209 #else // OS(MAC_OS_X)4210 static bool isSSE2Present()4211 {4212 if (s_sse2CheckState == CPUIDCheckState::NotChecked)4213 collectCPUFeatures();4214 return s_sse2CheckState == CPUIDCheckState::Set;4215 }4216 4217 #endif // OS(MAC_OS_X)4218 #elif !defined(NDEBUG) // CPU(X86)4219 4220 // On x86-64 we should never be checking for SSE2 in a non-debug build,4221 // but non debug add this method to keep the asserts above happy.4222 static bool isSSE2Present()4223 {4224 return true;4225 }4226 4227 #endif4228 4229 4200 using CPUID = std::array<unsigned, 4>; 4230 4201 static CPUID getCPUID(unsigned level); … … 4232 4203 JS_EXPORT_PRIVATE static void collectCPUFeatures(); 4233 4204 4234 JS_EXPORT_PRIVATE static CPUIDCheckState s_sse2CheckState;4235 4205 JS_EXPORT_PRIVATE static CPUIDCheckState s_sse4_1CheckState; 4236 4206 JS_EXPORT_PRIVATE static CPUIDCheckState s_sse4_2CheckState;
Note: See TracChangeset
for help on using the changeset viewer.