Running V8 on ARM64 Windows?

120 views
Skip to first unread message

Thomson Tan

unread,
Apr 5, 2018, 9:19:48 PM4/5/18
to v8-users
For the new OS Windows 10 on ARM (based on ARMv8 64-bit instruction set), I am curious on what changes in V8 are needed to run it? I think V8's JIT could generate instructions for this processor because it is also used in many Android phones, what and where are the ABI requirements of V8?  Thanks.

Ben Noordhuis

unread,
Apr 6, 2018, 5:18:32 AM4/6/18
to v8-users
Are you planning to port it to that platform? V8 uses an internal
calling convention in JIT-generated code. The only places where you
need to worry about the native calling convention is at the edges,
where generated code calls into native C++ code. Let me know if you
need more details.

Thomson Tan

unread,
Apr 6, 2018, 12:17:59 PM4/6/18
to v8-users
Thanks Ben. Yes, I am experimenting port V8 to this platform. Would you please point me to the code which handles native code calling convention from JIT code?

BTW: I am Microsoft employee working on this new Windows platform.

Ben Noordhuis

unread,
Apr 6, 2018, 12:43:16 PM4/6/18
to v8-users
On Fri, Apr 6, 2018 at 6:17 PM, Thomson Tan <lil...@gmail.com> wrote:
> Thanks Ben. Yes, I am experimenting port V8 to this platform. Would you
> please point me to the code which handles native code calling convention
> from JIT code?

Grep src/x64/code-stubs-x64.cc for '_WIN64' and you'll find it used in
methods like `CallApiCallbackStub::Generate()` and
`CallApiGetterStub::Generate()`.

The same methods in src/arm64/code-stubs-arm64.cc are likely the ones
you want - and if not, grep for 'CallApiFunctionAndReturn'.

Rodolph Perfetta

unread,
Apr 10, 2018, 6:43:34 PM4/10/18
to v8-u...@googlegroups.com
Hi,

The arm64 port follows the procedure call standard defined here: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055b/IHI0055B_aapcs64.pdf , I do not know if/how Windows on Arm differs. The main interface points are JSEntryStub, CEntryStub,and DirectCEntryStub (src/arm64/code-stub-arm64.cc). There are some other JS to C++ calls in TurboFan, look for the macro assembler function "CallCFunction" (used for calling Cos, Sin for example).

HTH,
Rodolph

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages