Tutorial: How to add a builtin function to the GCC backend
- Track: GCC (GNU Toolchain)
- Room: K.3.201
- Day: Saturday
- Start: 15:55
- End: 16:20
- Video only: k3201
- Chat: Join the conversation!
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.
Speakers
Jeremy Bennett |