Closed Bug 601016 Opened 14 years ago Closed 14 years ago

JM: Add detection for all levels of SSE support

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: millerdevel, Unassigned)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(3 files)

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.127 Safari/533.4 Build Identifier: As there's currently only SSE2, SSE4.1 and SSE4.2 detection available, it made sense to finish it off and add support for checking all possible levels. Reproducible: Always
Attached patch patch v1Splinter Review
Adds checking for all levels of SSE. The check to see if CPUID exists isn't done... I'm not even aware of a processor that doesn't support it anymore.
Attachment #479954 - Flags: review?
Attachment #479954 - Flags: review? → review?(sstangl)
Evidently SSE detection never worked on x64 -- it was fine because we never called the check function. Changing jscntxt.cpp:2201 (updateJITEnabled()) to > # if defined JS_CPU_X86 || defined JS_CPU_X64 to force getSSEState() to be called results in a build error. We should be able to check SSE state even on x64, even though AMD64 implies >= SSE2.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch x64 fix v1Splinter Review
Copied the existing version for gcc, changed the pushl/popl to pushq/popq, and threw a #if WTF_CPU_X86_64 around it.
Attachment #479975 - Flags: review?(sstangl)
Attachment #479975 - Flags: review?(sstangl) → review+
Attachment #479954 - Flags: review?(sstangl) → review+
This check in causes bugstage on Win64 LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library jscntxt.obj : error LNK2019: unresolved external symbol "void __cdecl __cpuid(int * const,int)" (?__cpuid@@YAXQEAHH@Z) referenced in function "private: static void __cdecl JSC::MacroAssemblerX86Common::setSSECheckState(void)" (?setSSECheckS tate@MacroAssemblerX86Common@JSC@@CAXXZ) mozjs.dll : fatal error LNK1120: 1 unresolved externals
Attachment #480024 - Flags: review?(sstangl)
Comment on attachment 480024 [details] [diff] [review] fix for win64 Thanks for catching this. This fix should be upstreamed at some point, since the problem exists in MASM as exists in the WebKit tree.
Attachment #480024 - Flags: review?(sstangl) → review+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: