Bug 137304

Summary: [Win] 32-bit JavaScriptCore should limit itself to the C loop
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: JavaScriptCoreAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, bfulgham, cmarcelo, commit-queue, mark.lam, msaboff, peavo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
Patch msaboff: review+

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.