Skip to main content

Tutorial: How to add a builtin function to the GCC backend

K.3.201 | Day 1 | 15:55 - 16:20 | Speakers: Jeremy Bennett

Tutorial: How to add a builtin function to the GCC backend
A picture of a devroom at FOSDEM 2024
Open in browser
Get involved in the conversation!Join the chat

Notes

Abstract

A common first step to adding full code-generation functionality for a new instruction, or set of instructions is to add them to the back-end as a builtin function. This is particularly common with RISC-V where custom ISA extensions are common place.

In this tutorial I will take you through the steps to add a builtin-function to the back-end, using a case study from the OpenHW CV32E4Pv2 RISC-V core. This has 8 ISA extensions, with a total of more than 300 instructions.

I will conclude by looking at some of the things we got wrong. In particular unexpected consequences when the new compiler started being used more widely.

Attachments

Speakers

Jeremy Bennett

Notice: The placeholder video image is licensed under CC BY-SA 4.0. The original image can be found hereChanges made to the image are: Cropped the image to a new ratio, part of the image was cut off.