Congrats! The Google V8 JavaScript Engine now supports RV32GC.

146 views
Skip to first unread message

Wei Wu (吴伟)

unread,
Jul 29, 2022, 8:57:54 AM7/29/22
to RISC-V SW Dev, qi...@iscas.ac.cn
Hi, everyone

We are glad to share that the RV32GC porting of V8 (the JavaScript
engine of the Chrome browser and Node.js) is merged by the Google
upstream today[1].

The porting has been carried out in a cooperative way as a mentorship
project of RVI and the Linux Foundation[2]. Thanks to the
communication channel provided by the mentorship project (special
thanks to Megan!), people who are willing to contribute to RISC-V
could join together more effectively and easily.

Now V8 can support both 32bit and 64bit backends for RISC-V ISA. The
team from PLCT will maintain for it in long term. Reporting bugs at
GitHub repo site[3] is welcome. We hope this would be a stepping
stone to enable more applications for the 32bit RISC-V world.

[1] https://chromium-review.googlesource.com/c/v8/v8/+/3736732
[2] https://mentorship.lfx.linuxfoundation.org/project/2021e650-c533-4671-afed-bf87c089af09
[3] https://github.com/riscv-collab/v8

--
Best wishes,
Wei Wu (吴伟)

Andrew Waterman

unread,
Jul 29, 2022, 2:34:54 PM7/29/22
to Wei Wu (吴伟), RISC-V SW Dev, qi...@iscas.ac.cn
Great work getting it merged upstream!

Were there any porting challenges unique to RV32?

--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/CANkjrB4jrkYVvd3z%3DBPrFmOHv9TtB3X%2Bp2V%2Bi8L-nEgg3i5szw%40mail.gmail.com.

Ren Guo

unread,
Jul 29, 2022, 10:43:48 PM7/29/22
to RISC-V SW Dev, lazyp...@gmail.com, qi...@iscas.ac.cn
Great Job,  Congrats! Let's give more effort to the RV32 Linux world.

ji qiu

unread,
Aug 7, 2022, 12:05:52 PM8/7/22
to RISC-V SW Dev, andrew, RISC-V SW Dev, ji qiu, lazyp...@gmail.com
Hi Andrew, 

Sorry for this late reply due to my vacation. 

It's almost no special challenge for the RV64 to RV32 porting. The most common change is to use something like intptr_t instead of int64 for RV64 and int32 for RV32. The second common change is using lw instead of ld for GPR saving and restore. One thing that need to be treated carefully is that, when dealing with saving and restoring of float point registers, we need to calculate the space separately using size 8 and keep the alignment to 8 byte by paddings. However, in RV64, we just using size 8 for both GPR and FPR and the alignment is always 8.

Besides RV32GC and RV64GC, we had also added the V-extension's JIT support in V8. The most challenge part for the V support is that RISC-V is the first and only one which has an independent vector register file. For X86, ARM, MIPS, they have overlapped or aliased FPR and SIMD registers. So the register allocation for RISCV V-ext is quite different from the other backends in V8.
Reply all
Reply to author
Forward
0 new messages