On Tue, Mar 17, 2020 at 2:42 PM Maciej W. Rozycki <ma...@wdc.com> wrote:
> On Tue, 18 Feb 2020, Kito Cheng wrote:
> >  - fmv.x.s/fmv.s.x renamed to fmv.x.w/fmv.w.x in the latest RISC-V ISA
> >    manual.
>
>  The new mnemonics have been supported by GAS for a little while now and
> the old ones have been retained, however this is still a change that
> breaks backwards compatibility.  So I wonder if we shouldn't have an
> autoconf test included for this feature, and either resort to wiring GCC
> to keep using the old mnemonics or bail out at GCC compilation time if
> GAS is found not to handle the new ones.
>
>  At the very least I think we ought to document the minimum version of
> binutils now required by GCC for RISC-V support.

The new opcodes were added to gas in 2017-09-27, and I can't recommend
using any binutils or gcc release that predates 2018-01-01 because
they are all known to be buggy, or incompatible with the current ISA
definition.  So I don't see any need for a configure test for this
change.  Anyone missing the new instructions in gas has bigger
problems to worry about.

Speaking of which, the ISA is unfortunately still making the
occasional backwards incompatible change, though I and others keep
complaining about that.  There was a break between the privilege spec
1.9 and 1.9.1, and there was a break between the priv spec 1.9.1 and
1.11.  Though I'm told that the goal is no breaks from priv spec 1.10
forward, and that was released 2017-05-17 so we can't properly support
any priv spec predating that.  Fortunately the priv spec only affects
people doing OS level work, or bare metal work.  But there have been
some unpriv isa spec breaks too though not in any critical areas.  For
instance some instructions like fence.i and the csr* insns have been
moved out of the base ISA into extensions and we haven't decided how
to handle that yet.  binutils and gcc still think they are part of the
base ISA.  The syntax for specifying architecture extensions changed,
sx extensions were dropped, and it used to be that x came before s but
now s comes before x.  We decided to drop support for ISA strings
supported before the 2019-12-13 unpriv spec because there were no
known uses of s or sx extensions that would be affected by the change,
and it was too complicated trying to support both the old and new
syntax.  I realize that you would like perfect compatibility, but that
won't be possible until the RISC-V ecosystem is more mature.  At least
for the linux support, we are being very careful not to change
anything that would break linux.  That is just for rv64 linux though.
rv32 linux is not upstream yet, and still adding breaking changes
because of Y2038 work.  There was a very minor ABI change last year
that affects rv64 linux, but it was obscure enough that no one testing
gcc-10 seems to have been affected by it.  There are also no official
distro releases that we need backward compatibility with yet.

As for the minimum binutils version, I would strongly recommend the
most recent one released before the gcc release that you are using,
though it is likely than anything back to 2018-01-01 would work, just
not as well.

Jim

Reply via email to