gemini-2.5-flash-lite-preview-09-2025| input-price: 0.1 output-price: 0.4 max-context-length: 128_000 (cost: $0.003) · Anfrage: 2025-12-11T06:35:38.425845

Generated by rs-summarizer Version unbekannt

This presentation outlines the speaker's experience "cargo-culting" the SBCL (Steel Bank Common Lisp) backend for the RISC-V architecture. It details the process, the significant hurdles encountered (especially early bootstrapping without proper debugging tools), and the current status of the port. The future work focuses on integrating RISC-V specific extensions (like the C extension) and improving backend portability across different architectures.

Abstract:

This presentation by Charles Zhang details the process of developing an SBCL compiler backend for the RISC-V Instruction Set Architecture (ISA). The speaker, a third-year student with prior compiler experience (including a CLISP GSoC project), began work on the RISC-V backend in Spring 2019. The effort was initially hampered by a complete lack of suitable hardware, forcing development on a slow, broken QEMU VM lacking GDB support, resulting in frustrating, manual debugging of core dumps. A significant early issue was developing for RV32 initially, only to discover that Linux support required RV64, resulting in a unique shared 32/64-bit backend structure within SBCL. The core development involved defining instruction templates (VOPs), leveraging existing backend designs (MIPS being architecturally close), and dealing with frustrating low-level details like 64-bit object layout differences. The speaker switched the garbage collector implementation from cheneygc to the faster gengc. Currently, the backend can run Quicklisp with few remaining test failures, mostly related to floating-point issues, as RISC-V lacks hardware floating-point traps. Future work includes implementing the C extension, improving debugging support (especially single-stepping), settling on a synchronization method for native threading, and abstracting common backend logic to ease future porting efforts.

Cargo-culting an SBCL backend for RISC-V

Summary Rating: No ratings yet
Article Rating: No ratings yet

Source