Bug 99153 - x32 support of JavaScriptCore
: x32 support of JavaScriptCore
Status: NEW
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To: Yuqiang Xian
:
Depends on: 101325 99154 100321 100450
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-12 02:20 PDT by Yuqiang Xian
Modified: 2013-04-07 01:08 PDT (History)
4 users (show)

See Also:


Attachments
[future] patch (20.18 KB, patch)
2012-10-12 03:04 PDT, Yuqiang Xian
no flags Details | Formatted Diff | Diff
x32 jit patch (20.65 KB, patch)
2012-10-19 08:24 PDT, Yuqiang Xian
no flags Details | Formatted Diff | Diff
x32 LLInt patch (81.07 KB, patch)
2012-10-19 08:38 PDT, Yuqiang Xian
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuqiang Xian 2012-10-12 02:20:25 PDT
This is the meta bug to track the x32 support of JavaScriptCore.

There's a new x32 ABI - a 32-bit psABI for x86-64 with 32-bit pointer size. It tries to leverage the advantage of more registers and IP relative addressing from x64 and the advantage of smaller memory footprint from IA32. More details of the x32 ABI can be found here: https://sites.google.com/site/x32abi/.

The Linux kernel supports x32 since 3.4, and the commonly used development tools and libraries are getting in the x32 support. Also more details about current status is available in the above link.

We also want JavaScriptCore to support x32.
Comment 1 Yuqiang Xian 2012-10-12 02:57:30 PDT
The first step is to refactor the MacroAssembler interfaces, especially to differentiate the operations on pointers from the operations on 64-bit integers (e.g., the JSValues), as on x32 the pointer size is 4 bytes.

Bug #99154 is created for the refactoring work.
Comment 2 Yuqiang Xian 2012-10-12 03:04:43 PDT
Created attachment 168387 [details]
[future] patch

This is the "future" patch to add the x32 support - assuming that the refactoring work in bug #99154 is taken in. (thus cannot be applied without the 99154 patch.)
I pasted it here just for you to have a rough idea what it may look like if we want to add the x32 support.

The LLInt is not supported yet. While it's on the plan.
Comment 3 Yuqiang Xian 2012-10-19 08:24:09 PDT
Created attachment 169623 [details]
x32 jit patch

*Not* asking for a detailed review. 
Uploading mainly for back-up purpose.
Comment 4 Yuqiang Xian 2012-10-19 08:38:37 PDT
Created attachment 169626 [details]
x32 LLInt patch

For back-up purpose now.

Add the x32 backend for the low level interpreter. It now together with the JITs pass all the javascriptcore tests and major benchmarks on x32. We may need more efforts on the CLoop backend.

We may need to split the patch as what we've done for the x32 support of the JIT compilers (bug #99154), i.e., one (or more) for general offlineasm and LLInt refactoring, and another one for x32 *specific* change.
Comment 5 Yuqiang Xian 2012-10-24 22:03:33 PDT
Bug #100321 is created for the LLInt64 refactoring work. Adding the dependency.
Comment 6 Yuqiang Xian 2012-11-06 16:51:03 PST
Comment on attachment 169623 [details]
x32 jit patch

obsolete this patch. The correct one is in bug #100450.
Comment 7 Yuqiang Xian 2012-11-06 16:51:38 PST
Comment on attachment 169626 [details]
x32 LLInt patch

obsolete this patch. The correct one is in bug #101325.