[fpc-devel] RISC-V separating Zicsr and Zifencei from base ISA
Christo Crause
christo.crause at gmail.com
Thu Sep 18 07:55:27 CEST 2025
A while ago the GNU RISC-V toolchain [1] implemented separation of
the Zicsr and Zifencei options from the base integer ISA according to the
ISA spec 20191213. Espressif bumped their GNU toolchain for esp-idf v5.1
to GCC 12.2 in June 2023, which requires explicitly specifying the Zicsr
and Zifencei extensions to binutils when trying to assemble and link code
using these extensions. Since binutils 2.36 explicitly passing these
extensions as part of -march is required by default.
How should this be included in the compiler?
a) Change all the subarch names to explicitly include the extensions where
supported, e.g. change rv32_imac to rv32_imac_zicsr_zifencei.
Going forward this is probably the better option since the subarch name
includes all the supported extensions explicitly?
b) Keep the subarch names as current, add the cpu flags to the subarch and
automatically append the extensions to the -march option passed to binutils.
1. https://groups.google.com/a/groups.riscv.org/g/sw-dev/c/aE1ZeHHCYf4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20250918/3d6e655a/attachment.htm>
More information about the fpc-devel
mailing list