Skip to the content.

Compiler Explorer

If you want to quickly see what assembly language code is generated from C code for RISC-V (or a number of other ISAs) the Compiler Exploror site (often referred to as “Godbolt” after its domain name and creator Matt Godbolt) is very useful.

You can choose rv32 or rv64, different versions of gcc or clang, and different compiler options such as optimisation levels or code generation options such as whether to use extensions such as M, F, D, or C.

Here is a sample showing a simple factorial function

Compiler Explorer example