Bug 137304 - [Win] 32-bit JavaScriptCore should limit itself to the C loop
Summary: [Win] 32-bit JavaScriptCore should limit itself to the C loop
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-10-01 10:29 PDT by Brent Fulgham
Modified: 2014-10-06 09:49 PDT (History)
8 users (show)

See Also:


Attachments
Patch (3.02 KB, patch)
2014-10-01 10:41 PDT, Brent Fulgham
msaboff: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2014-10-01 10:29:54 PDT
The awesome LLInt interpreter layer in JSC uses SSE2 instructions that are not available in pre-Pentium 4. We need to continue supporting this old hardware as long as we are supporting Windows XP for WebKit.

Consequently, we need to turn off LLInt on 32-bit Windows builds.
Comment 1 Brent Fulgham 2014-10-01 10:40:51 PDT
<rdar://problem/18375370>
Comment 2 Brent Fulgham 2014-10-01 10:41:42 PDT
Created attachment 239034 [details]
Patch
Comment 3 Michael Saboff 2014-10-01 10:42:49 PDT
Comment on attachment 239034 [details]
Patch

r=me
Comment 4 Brent Fulgham 2014-10-01 11:22:35 PDT
Committed r174162: <http://trac.webkit.org/changeset/174162>
Comment 5 Brent Fulgham 2014-10-01 11:29:30 PDT
Confirmed no regressions in JSC test runs with this change.
Comment 6 peavo 2014-10-06 09:17:32 PDT
Do we know which SSE2 instructions are used? Maybe we could rewrite the usage of those?
Comment 7 Brent Fulgham 2014-10-06 09:41:48 PDT
(In reply to comment #6)
> Do we know which SSE2 instructions are used? Maybe we could rewrite the usage of those?

I believe the issue was the need to support IEEE floating point behavior. At one time, the Qt project had some code to use x86+math hacks to deliver similar support on non-SSE hardware, but that code probably got excised when they removed their port.

Pragmatically, limiting JIT support to 64-bit is probably not the end of the world. Most people who care about performance are probably running 64-bit CPUs anyway. It would be great to re-enable the JIT for 32-bit in general, but people with specific performance needs can always build WebKit with the 32-bit JIT enabled for their own deployments.
Comment 8 peavo 2014-10-06 09:49:36 PDT
(In reply to comment #7)
> (In reply to comment #6)
> > Do we know which SSE2 instructions are used? Maybe we could rewrite the usage of those?
> 
> I believe the issue was the need to support IEEE floating point behavior. At one time, the Qt project had some code to use x86+math hacks to deliver similar support on non-SSE hardware, but that code probably got excised when they removed their port.
> 
> Pragmatically, limiting JIT support to 64-bit is probably not the end of the world. Most people who care about performance are probably running 64-bit CPUs anyway. It would be great to re-enable the JIT for 32-bit in general, but people with specific performance needs can always build WebKit with the 32-bit JIT enabled for their own deployments.

Ok :) I also see that there are a number of ASSERT(isSSE2Present()) statements in MacroAssemblerX86Common.h which indicates where SSE2 is required.