public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Kito Cheng <kito.cheng@gmail.com>
To: libc-alpha@sourceware.org
Cc: jim.wilson.gcc@gmail.com, Andrew Waterman <andrew@sifive.com>,
	 Palmer Dabbelt <palmer@dabbelt.com>,
	Nelson Chu <nelson.chu@sifive.com>
Subject: RISC-V GNU toolchain bumping default ISA spec to 20191213
Date: Mon, 24 Jan 2022 21:49:23 +0800	[thread overview]
Message-ID: <CA+yXCZC6g4mqiiUVcgFP6q=sOOPgO1GBYLWor44vNiqY=Jdh8A@mail.gmail.com> (raw)

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.

             reply	other threads:[~2022-01-24 13:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24 13:49 Kito Cheng [this message]
2022-01-24 14:54 ` Andreas Schwab
2022-01-25  2:27   ` Kito Cheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+yXCZC6g4mqiiUVcgFP6q=sOOPgO1GBYLWor44vNiqY=Jdh8A@mail.gmail.com' \
    --to=kito.cheng@gmail.com \
    --cc=andrew@sifive.com \
    --cc=jim.wilson.gcc@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=nelson.chu@sifive.com \
    --cc=palmer@dabbelt.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).