public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* RISC-V GNU toolchain bumping default ISA spec to 20191213
@ 2022-01-24 13:49 Kito Cheng
  2022-01-24 14:54 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Kito Cheng @ 2022-01-24 13:49 UTC (permalink / raw)
  To: libc-alpha; +Cc: jim.wilson.gcc, Andrew Waterman, Palmer Dabbelt, Nelson Chu

Hi

It’s Kito Cheng from the RISC-V GCC community, just sharing some news
about the default ISA spec version that has been bumped to 20191213 on
both RISC-V GCC and binutils recently, and that has one major
incompatibility issue between current default ISA spec versions.

The major incompatibility issue is the csr read/write (csrr*/csrw*)
instructions and fence.i instruction has separated from the `I`
extension, become two standalone extensions: Zicsr and Zifencei; so
you might get error messages like that: unrecognized opcode `csrr`.

----------------------------------
# How to resolve those issues?

Here is two solution to resolve:

- First one is what we recommend, adding zicsr and/or zifencei to your
-march option, e.g. -march=rv64imac become
-march=rv64imac_zicsr_zifencei

- The second one is a kind of workaround, using -misa-spec=2.2 to
force RISC-V GCC using the older ISA spec version, however this is
strongly  *NOT* recommended.

In case you want everything like before, you can add
--with-isa-spec=2.2 build option for GCC and binutils, then the
toolchain will default using the old version and work as an older GNU
toolchain release.

----------------------------------
# Why GCC/binutils bump that?

The default ISA spec version was set to 2.2 for long time, however the
spec is released at May, 2017, which is 5 years ago, and RISC-V has at
least two ISA spec release after that, so we believe that’s time to
bump, and we also raise the discussion on the RISC-V BoF at Linux
plumber, we reach a consensus is that we should moving forward even
that having incompatible issue.

----------------------------------
# Why bump that so late?

We worried about the incompatibility issue, but we realized that is
unavoidable, and RISC-V is growing very quickly in the past year, so
we believe it would be better to move forward now.


# Why is there an incompatibility issue there? Why can't you avoid that?

That is because the RISC-V ISA spec has changed, we believe the
toolchain should honor what spec written.


----------------------------------
# Which ISA spec versions are supported by GNU toolchain now?

Currently we support 2.2 20190608 and 20191213.

2.2:
https://github.com/riscv/riscv-isa-manual/releases/tag/riscv-user-2.2

20190608:
https://github.com/riscv/riscv-isa-manual/releases/tag/Ratified-IMFDQC-and-Priv-v1.11

20191213:
https://github.com/riscv/riscv-isa-manual/releases/tag/Ratified-IMAFDQC

----------------------------------
# Is there any newer ISA spec supported? It’s 2022!

20191213 is already 2 years ago, but RISC-V didn’t have further formal
ISA spec release after that, what we can promise is that RISC-V GNU
toolchain will support soon if ISA spec has newer release.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: RISC-V GNU toolchain bumping default ISA spec to 20191213
  2022-01-24 13:49 RISC-V GNU toolchain bumping default ISA spec to 20191213 Kito Cheng
@ 2022-01-24 14:54 ` Andreas Schwab
  2022-01-25  2:27   ` Kito Cheng
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2022-01-24 14:54 UTC (permalink / raw)
  To: Kito Cheng via Libc-alpha; +Cc: Kito Cheng, Nelson Chu, Andrew Waterman

On Jan 24 2022, Kito Cheng via Libc-alpha wrote:

> Here is two solution to resolve:
>
> - First one is what we recommend, adding zicsr and/or zifencei to your
> -march option, e.g. -march=rv64imac become
> -march=rv64imac_zicsr_zifencei

Does this have any effect on the rv64g alias?

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: RISC-V GNU toolchain bumping default ISA spec to 20191213
  2022-01-24 14:54 ` Andreas Schwab
@ 2022-01-25  2:27   ` Kito Cheng
  0 siblings, 0 replies; 3+ messages in thread
From: Kito Cheng @ 2022-01-25  2:27 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Kito Cheng via Libc-alpha, Nelson Chu, Andrew Waterman

Hi Andreas:

> Does this have any effect on the rv64g alias?

No, rv64g would be fine :)
rv64g means rv64imafd in ISA spec 2.2
and that became rv64imafd_zicsr_zifencei in ISA spec  20190608 and 20191213.


On Mon, Jan 24, 2022 at 10:54 PM Andreas Schwab <schwab@linux-m68k.org> wrote:
>
> On Jan 24 2022, Kito Cheng via Libc-alpha wrote:
>
> > Here is two solution to resolve:
> >
> > - First one is what we recommend, adding zicsr and/or zifencei to your
> > -march option, e.g. -march=rv64imac become
> > -march=rv64imac_zicsr_zifencei
>
> Does this have any effect on the rv64g alias?
>
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
> "And now for something completely different."

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-25  2:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24 13:49 RISC-V GNU toolchain bumping default ISA spec to 20191213 Kito Cheng
2022-01-24 14:54 ` Andreas Schwab
2022-01-25  2:27   ` Kito Cheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).