-march 'g' option?

In All Aboard, Part 1: The -march, -mabi, and -mtune arguments to RISC-V Compilers the very first example of using an -march argument shows:

$ riscv64-unknown-elf-gcc test.c -march=rv64gc -mabi=lp64d -o- -S -O3

What is the g in rv64gc? The g option isn’t described in the surrounding text anywhere.

@palmer

From the RISC-V ISA manual, section 10.4:

We have also defined an abbreviation “G” to represent the “IMAFD” base and extensions, as this
is intended to represent our standard general-purpose ISA.

Thank you, @mwachs5, for the explanation!

Ideally either:

  • the ‘g’ option should be added to the blog post so its usage is understood in the example
  • the ‘g’ option should not be used in the blog post’s example (i.e. without explanation)

:slight_smile:

I’ve updated the blog on my end, but it’ll probably take a while to filter through the internet.

Thanks!

1 Like

@palmer

Awesome! Thank you for the blog posts!