On Mon, Jun 29, 2020 at 7:00 PM Kito Cheng <kito.ch...@sifive.com> wrote: > - Arch version should preserved if user explicitly specified the version. > e.g. > After normalize, -march=rv32if3d should be -march=rv32i_f3p0d > instead of-march=rv32ifd.
This looks good to me. > + explicit_version_p(false) I'd suggest a space before the open paren. This isn't a criticism of your patch, but I noticed while looking at this that we accept gXpY and expand to iXpY_mXpY_ etc. However, imafd are all numbered independently. It doesn't make much sense to specify a version with g and assume it is correct for all of imafd. Similarly with the implied extensions, e.g. dXpY is expanded to fXpY_dXpY, though in this case it is likely that f and d numbers will remain compatible. And q too. Still it looks a bit funny to be making that assumption and there probably will be other examples where the versions of the implied extensions won't match the specified extension. Actually I see that f implies Zicsr, and those two have different version numbers, we just haven't implemented Zicsr yet. We are correctly implementing the rules as specified, the rules just don't make sense here. We probably need to file an issue against the riscv-isa-manual project for a clarification of how to handle this stuff. Jim