On Tue, 13 Aug 2019 at 07:50, Kito Cheng <
kito....@gmail.com> wrote:
>
> I've organized the issue to a list for further discussion , and item 2
> and 4 is new.
Hi Kito, thanks for pushing this issue forwards. Some thoughts in-line below.
> item 2 was inspired by Andrew, he was asking me does it possible
> treats "I" as "IZifence_Zicsr" for binutils.
> For item 4, I've created a issue for that before[1], but not conclusion yet.
>
> 1. -misa-spec=[2.0|2.1|2.2|YYYYMM|YYYYMMDD]
> - DD can be omitted, I assume there is no more than one releases
> within 1 month.
> - Interaction between -misa-spce and -march:
> - Set default isa version for each extensions.
I like -misa-spec as a shortcut for setting version of various
extensions. I appreciate there were confusions before about the
document versioning vs versioning for individual extensions, but
especially as the number of standard extensions grow I think it's
going to become burdensome to track each number. My hope is that most
shipping silicon will implement the versions as of a given spec
release, which would make it easy to refer to in short form.
Another question to be answered: what to do when standard extensions
are specified that aren't included in that given -misa-spec (but the
compiler does indeed know about)? Error, or use the first released
version? This interacts with the question below about what default
-misa-spec is assumed (unless we imagine different behaviour depending
on explicitly specified or compile-time assumed misa-spec).
> - Limit the version of ISA extensions?
> - e.g. You can't use -march=rv32i2p1 -misa-spec=2.2 since it
> require -misa-spec=201906
I think allowing -march to override might be reasonable behaviour.
> - Add one field on ELF attribute, new integer field
> - Value 20/21/22 for 2.0/2.1/2.2
> - Value YYYYMMDD for later version, e.g. 20190608 for
> 20190608-Base-Ratified.
Would it be better to just produce a canonicalised ISA naming string
with all version information and emit that?
> 2. Default implied Zicsr and Zifencei:
> - Minimized the impact of behavior change for most use case.
> - Let compiler/assembler append Zicsr and Zifencei automatically,
> because this configuration is most general.
> - New compiler/assembler option: -m[no-]implied-zicsr-zifencei
> - New configuration option for building GNU toolchain:
> --with-implied-zicsr-zifencei=[yes|no]
I agree that Zicsr is likely to cause plenty of confusion. I m
concerned that adding another way of controlling that behaviour beyond
-misa-spec is just going to lead to prolonged confusion. e.g. people
confused why different toolchains that seem otherwise identical have
different behaviour. Is setting the default -misa-spec at compile time
not enough? For people who don't want to move to the new zicsr
behaviour, they can stick to an older -misa-spec.
> 3. Discard old order for x, s, sx.
> - We didn't have any s extension yet, so just using new order in toolchain
>
> 4. How to expanding version of G?
> - G2.2 = I2p2_M2p2_A2p2_F2p2_D2p2 ?
> - G2.2 = I2p0_M2p0_A2p0_F2p0_D2p0 ?
> - Or other expanding scheme?
Versioning for G seems too confusing given that it never really had a
version other than the doc version, so I suggest just relying on
misa-spec for this.
> ----------------- GNU Toolchain only -----------------
>
> 5. Add new configure options for building toolchain:
> - --with-riscv-isa-spec= to control the default ISA spec version in toolchain,
> - --with-riscv-isa-version=<isa-with-versions> to provide a way fine
> tune the default version of each ISA extension.
> - --with-implied-zicsr-zifencei=[yes|no] to control
> -mimplied-zicsr-zifencei enable by default or not.
As mentioned previously in this response, the implied zicsr-zifencei
feels like it might cause more confusion than it solves.
Best,
Alex