Re: [PATCH 3/7] RISC-V: Support new GAS options and configure options to set ISA versions.

Nelson Chu
2020-04-24T06:43:59Z

On Fri, Apr 24, 2020 at 10:37 AM Nelson Chu <nelson.chu@sifive.com> wrote:
>
> Hi Palmer,
>
> On Fri, Apr 24, 2020 at 6:59 AM Palmer Dabbelt <palmer@dabbelt.com> wrote:
> > > * -mriscv-isa-version = <ISA-string>
> > > The syntax of <ISA-string> is same as -march option, but without rv32 or rv64
> > > prefix. There are two reasons that you may need this option,
> > >
> > > 1. Some versions of extensions defined in the ISA spec are not matched to the
> > > toolchain’s implementation. For example, V-ext is defined to version 0.7 in
> > > ISA spec, but we only have implementations for 0.8 and 0.9. Therefore, you
> > > have to use this option to choose the correct version for V-ext.
> > >
> > > 2. You want to update the version for the specific standard extensions if the
> > > version are not set in the ELF arch attributes and -march option.
> >
> > I don't buy the argument for this. The V extension stuff isn't relevant: those
> > are all draft versions, and this is a perfect reason why we don't want to take
> > drafts upstream. When we have a defined V ISA it'll be part of a versioned
> > RISC-V specification and any users that want it can just use at least that ISA
> > spec.
>
> I think I got your point, we all have reached consensus that it's
> better not to take draft spec upstream. The v-extension might be a
> little different, the latest released ISA spec defines the v-ext as
> 0.7, even if the released riscv-v-spec is up to 0.8. According to our
> consensus, we should accept the 0.8 and 0.9 v-ext on upstream until we
> have a released ISA spec defining them. Otherwise, we can just accept
> the 0.7 v-ext for now. I guess that is why we just have v-ext 0.8 and
> 0.9 on riscv/riscv-binutils-gdb rather than upstream. This makes
> sense, thank you :)

Correct the information. The version of extensions before 2.0 should
be draft, not release.

> And we can still use -march to choose the version we want, including
> v-ext. If users use the rvv-0.9.x in riscv/riscv-binutils-gdb, they
> have to set the v-ext with version 0.9 by -march. Otherwise, we will
> give them v0p0 if they only set -misa-spec=20191213.

Give them v0p0, or we should give an error to make sure the valid
version is set by march. The latter seems more safe. We give 0p0
when the user sets x extension without version.

Thanks
Nelson