Porting a JIT Compiler to RISC-V: Challenges and Opportunities - Archive ouverte HAL Access content directly
Conference Papers Year : 2022

Porting a JIT Compiler to RISC-V: Challenges and Opportunities


The RISC-V Instruction Set Architecture (ISA) is an open-source, modular and extensible ISA. The ability to add new instructions into a dedicated core opens up perspectives to accelerate VM components or provide dedicated hardware IPs to applications running on top. However, the RISC-V ISA design is clashing on several aspects with other ISAs and therefore software historically built around them. Among them, the lack of condition codes and instruction expansion through simple instruction combination. In this paper we present the challenges of porting Cogit, the Pharo's JIT compiler tightly linked to the x86 ISA, on RISC-V. We present concrete examples of them and the rationale behind their inclusion in the RISC-V ISA. We show how those mismatches are solved through design choices of the compilation process or through tools helping development: a VM simulation framework to keep the development in a high-level environment for the most part, an ISA-agnostic test harness covering main VM functionalities and a machine code debugger to explore and execute generated machine code. We also present a way to prototype custom instructions and execute them in the Pharo environment.
Fichier principal
Vignette du fichier
default.pdf (393.49 Ko) Télécharger le fichier
Origin Files produced by the author(s)

Dates and versions

hal-03725841 , version 1 (13-09-2022)


  • HAL Id : hal-03725841 , version 1


Quentin Ducasse, Guillermo Polito, Pablo Tesone, Pascal Cotret, Loïc Lagadec. Porting a JIT Compiler to RISC-V: Challenges and Opportunities. Proceedings of the 19th International Conference on Managed Programming Languages and Runtimes (MPLR '22), Sep 2022, Brussels, Belgium. ⟨hal-03725841⟩
237 View
600 Download


Gmail Mastodon Facebook X LinkedIn More