Posted by: Florian Loitsch, Ji Qiu, Kasper Lund, Yahan Lu, Zhijin Zeng In 2020, Kim McMahon wrote a blog post where she announced the open-sourcing of V8 on RISC-V. At that time, the port was still in a separate repository, and lots of work remained to be done. In the last few years, RISC-V support has been upstreamed to the main V8 repository, and the port is now mostly at feature parity with the officially supported architectures like x86_64 and ARM64. The port is continuously tested on V8鈥檚 buildbots, where it shines as one of the most green ports. The RISC-V community is one of the fastest to fix breakages that are introduced by V8 core developers. An independent Jenkins buildbot tests even more configurations. In this post, we want to highlight a few interesting changes that were made in the last 6 months. These are in no way exhaustive, or even representative of all the work that has gone into the RISC-V port of V8. Instead, we have picked a few changes that we found particularly interesting. Pool improvements The RISC-V port uses two kinds of pools: constant pools and trampoline pools. The constant pool is used to load constants that cannot be encoded directly in the instructions, while the trampoline pool is used to handle long jumps that cannot be encoded in a single instruction. Basically, V8 emits a near-jump for all forward jumps. If the target ends up too far away, the near-jump target is adjusted to a jump pool entry that contains a long-jump to the actual target. Since there are only 13 bits available as offset for near jumps, we must ensure that the jump pool is not emitted too far away from the near-jump instruction. To achieve this, V8 checks regularly during code generation if the distance between the last trampoline pool entry and the current position exceeds a certain threshold. If it does, the trampoline pool is emitted at the current position. # Jump over the trampoline pool (for 64 entries). j 516 # Entry 0: auipc t6, 0x0 jalr zero_reg, 1552(...
First seen: 2026-01-07 06:42
Last seen: 2026-01-08 01:45