coreblocks icon indicating copy to clipboard operation
coreblocks copied to clipboard

Generate compiler options from `isa_str`

Open piotro888 opened this issue 3 years ago • 2 comments

We use some of the extensions (like Zmmul) that for some reason are not supported by compliers. We should generate superset of our internal isa_str that is accepted by gcc or binutills as isa valid paramter. This is needed in core tests generated from assembly.

Example rv32i_zmmul -> would be converted to rv32im for gcc and binutils (possibly with extra parameter -no-div for gcc). Disscussion for Zmmul in gcc: https://groups.google.com/a/groups.riscv.org/g/isa-dev/c/M-37xaIllsw, change was not accepted in 2021 because this extension was not yet frozen, but now it is ratified since 2022 (https://github.com/riscv/riscv-isa-manual/blob/master/src/m.tex, maybe we should file an issue to gcc?). Anyway, problem would probably exist for some other extensions too.

piotro888 avatar Apr 15 '23 10:04 piotro888

For Zmmul, it turns out that support for it was commited 7/8 months ago to gcc and binutils; and it should be available in the latest release of binutils 2.40, but not yet in gcc (we have to wait for next release).

piotro888 avatar Apr 16 '23 11:04 piotro888

I've backported binutils 2.40 for Debian stable, and I can confirm that it understands Zmmul.

tilk avatar Apr 18 '23 08:04 tilk