Ignore:
Timestamp:
Apr 8, 2019, 3:16:22 AM (6 years ago)
Author:
[email protected]
Message:

[CMake] Detect SSE2 at compile time
https://bugs.webkit.org/show_bug.cgi?id=196488

Patch by Xan Lopez <Xan Lopez> on 2019-04-08
Reviewed by Carlos Garcia Campos.

.:

  • CMakeLists.txt: Use FindSSE2.cmake to detect SSE2 support.
  • Source/cmake/FindSSE2.cmake: Added.

Source/JavaScriptCore:

  • assembler/MacroAssemblerX86Common.cpp: Remove unnecessary (and

incorrect) static_assert.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp

    r243293 r243989  
    168168static_assert(sizeof(Probe::State) == PROBE_SIZE, "Probe::State::size's matches ctiMasmProbeTrampoline");
    169169static_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 #endif
    175170
    176171#undef PROBE_OFFSETOF
     
    793788        {
    794789            CPUID cpuid = getCPUID(0x1);
    795             s_sse2CheckState = (cpuid[3] & (1 << 26)) ? CPUIDCheckState::Set : CPUIDCheckState::Clear;
    796790            s_sse4_1CheckState = (cpuid[2] & (1 << 19)) ? CPUIDCheckState::Set : CPUIDCheckState::Clear;
    797791            s_sse4_2CheckState = (cpuid[2] & (1 << 20)) ? CPUIDCheckState::Set : CPUIDCheckState::Clear;
     
    810804}
    811805
    812 MacroAssemblerX86Common::CPUIDCheckState MacroAssemblerX86Common::s_sse2CheckState = CPUIDCheckState::NotChecked;
    813806MacroAssemblerX86Common::CPUIDCheckState MacroAssemblerX86Common::s_sse4_1CheckState = CPUIDCheckState::NotChecked;
    814807MacroAssemblerX86Common::CPUIDCheckState MacroAssemblerX86Common::s_sse4_2CheckState = CPUIDCheckState::NotChecked;
Note: See TracChangeset for help on using the changeset viewer.