Bug 23787 - Allow JIT to generate SSE2 code if using GCC
Summary: Allow JIT to generate SSE2 code if using GCC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-06 03:16 PST by Csaba Osztrogonác
Modified: 2009-02-23 16:30 PST (History)
1 user (show)

See Also:


Attachments
6.6% progression on SunSpider (3.90 KB, text/plain)
2009-02-06 03:18 PST, Csaba Osztrogonác
no flags Details
testing patch (1.67 KB, patch)
2009-02-06 03:23 PST, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
proposed patch (1.21 KB, patch)
2009-02-06 03:25 PST, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
proposed patch (1.26 KB, patch)
2009-02-06 03:30 PST, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
proposed patch (1.37 KB, patch)
2009-02-16 05:19 PST, Csaba Osztrogonác
oliver: review+
Details | Formatted Diff | Diff
fixed patch (1.43 KB, patch)
2009-02-17 02:14 PST, Csaba Osztrogonác
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2009-02-06 03:16:40 PST
In jit/JITArithmetic.cpp/isSSE2Present() haven't been implemented testing SSE2 capability if using GCC. Now it works, and patch attached.
Comment 1 Csaba Osztrogonác 2009-02-06 03:18:09 PST
Created attachment 27386 [details]
6.6% progression on SunSpider
Comment 2 Csaba Osztrogonác 2009-02-06 03:23:33 PST
Created attachment 27387 [details]
testing patch

Use this patch for testing the new code. isSSE2Present() runs if JIT is enabled, but on x86 Linux it is diasbled at default.
Comment 3 Csaba Osztrogonác 2009-02-06 03:25:01 PST
Created attachment 27388 [details]
proposed patch
Comment 4 Csaba Osztrogonác 2009-02-06 03:30:10 PST
Created attachment 27389 [details]
proposed patch
Comment 5 Csaba Osztrogonác 2009-02-13 01:45:30 PST
(In reply to comment #2)
> Created an attachment (id=27387) [review]
> testing patch
> 
> Use this patch for testing the new code. isSSE2Present() runs if JIT is
> enabled, but on x86 Linux it is diasbled at default.

This testing patch is unneccessary from http://trac.webkit.org/changeset/40900 if using QT4.5 RC1, because JIT and WREC are default.

Comment 6 Csaba Osztrogonác 2009-02-16 05:19:57 PST
Created attachment 27692 [details]
proposed patch

patch updated for ToT, and gcc guard added
Comment 7 Oliver Hunt 2009-02-16 14:15:51 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	JavaScriptCore/ChangeLog
	M	JavaScriptCore/jit/JITArithmetic.cpp
Committed r41022
Comment 9 Csaba Osztrogonác 2009-02-16 19:37:47 PST
I'll see this problem now, and try to fix.
Comment 10 Oliver Hunt 2009-02-16 19:40:03 PST
Rolled out in r41036 due to gtk+qt build failures.
Comment 11 Csaba Osztrogonác 2009-02-16 19:43:11 PST
I think this is a gcc bug, and push/pop ebx manually instead of mark clobbered can solve this problem.
Comment 12 Csaba Osztrogonác 2009-02-17 02:14:28 PST
Created attachment 27723 [details]
fixed patch

Build error fixed.

If using -fPIC, ebx mustn't be in clobbered list, you have to save/restore it manually.
Comment 13 Oliver Hunt 2009-02-23 16:30:16 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	JavaScriptCore/ChangeLog
	M	JavaScriptCore/jit/JITArithmetic.cpp
Committed r41160