public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Christoph Müllner" <christoph.muellner@vrull.eu>
To: Palmer Dabbelt <palmer@dabbelt.com>
Cc: binutils@sourceware.org, nelson@rivosinc.com,
	 Andrew Waterman <andrew@sifive.com>,
	Jim Wilson <jim.wilson.gcc@gmail.com>,
	 research_trasio@irq.a4lg.com, philipp.tomsich@vrull.eu,
	 cooper.qu@linux.alibaba.com, lifang_xia@linux.alibaba.com,
	 yunhai@linux.alibaba.com, zhiwei_liu@linux.alibaba.com
Subject: Re: [PATCH] RISC-V: Fix T-Head Fmv vendor extension encoding
Date: Fri, 16 Dec 2022 19:59:53 +0100	[thread overview]
Message-ID: <CAEg0e7hOtcTsZLaB7An2yKY5Mu-+3DsEsw6-mzWmftZbs33M=g@mail.gmail.com> (raw)
In-Reply-To: <mhng-6f526f8c-f03f-43c1-b053-c36816d575c4@palmer-ri-x1c9a>

[-- Attachment #1: Type: text/plain, Size: 2579 bytes --]

On Fri, Dec 16, 2022 at 7:56 PM Palmer Dabbelt <palmer@dabbelt.com> wrote:

> On Fri, 16 Dec 2022 10:51:33 PST (-0800), christoph.muellner@vrull.eu
> wrote:
> > From: Christoph Müllner <christoph.muellner@vrull.eu>
> >
> > A recent change in the XTheadFmv spec fixed an encoding bug in the
> > document. This patch changes the code to follow this bugfix.
> >
> > Spec patch can be found here:
> >   https://github.com/T-head-Semi/thead-extension-spec/pull/11
>
> There's not much info in there.  Was this just a bug in the ISA manual?
> In other words, does the existing hardware (I know of at least C906s and
> C910s in the wild) behave the new way already?  In that case
>

Yes, this was just a bug in the ISA manual, which slipped through the
review.
The manual now matches the implementation.



>
> Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
>
> but if the hardware has the old behavior then we'll need to do something
> more complicated to avoid breaking compatibility.
>
> >
> > Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
> > ---
> >  gas/testsuite/gas/riscv/x-thead-fmv.d | 4 ++--
> >  include/opcode/riscv-opc.h            | 4 ++--
> >  2 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/gas/testsuite/gas/riscv/x-thead-fmv.d
> b/gas/testsuite/gas/riscv/x-thead-fmv.d
> > index f2bbe010beb..af8ce0c8ee0 100644
> > --- a/gas/testsuite/gas/riscv/x-thead-fmv.d
> > +++ b/gas/testsuite/gas/riscv/x-thead-fmv.d
> > @@ -7,5 +7,5 @@
> >  Disassembly of section .text:
> >
> >  0+000 <target>:
> > -[    ]+[0-9a-f]+:[   ]+6005950b[     ]+th.fmv.hw.x[  ]+a0,fa1
> > -[    ]+[0-9a-f]+:[   ]+5005158b[     ]+th.fmv.x.hw[  ]+a1,fa0
> > +[    ]+[0-9a-f]+:[   ]+5005950b[     ]+th.fmv.hw.x[  ]+a0,fa1
> > +[    ]+[0-9a-f]+:[   ]+6005158b[     ]+th.fmv.x.hw[  ]+a1,fa0
> > diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h
> > index 06e3df0f5a6..5420bfac91b 100644
> > --- a/include/opcode/riscv-opc.h
> > +++ b/include/opcode/riscv-opc.h
> > @@ -2209,9 +2209,9 @@
> >  #define MATCH_TH_FSURW 0x5000700b
> >  #define MASK_TH_FSURW 0xf800707f
> >  /* Vendor-specific (T-Head) XTheadFmv instructions. */
> > -#define MATCH_TH_FMV_HW_X 0x6000100b
> > +#define MATCH_TH_FMV_HW_X 0x5000100b
> >  #define MASK_TH_FMV_HW_X 0xfff0707f
> > -#define MATCH_TH_FMV_X_HW 0x5000100b
> > +#define MATCH_TH_FMV_X_HW 0x6000100b
> >  #define MASK_TH_FMV_X_HW 0xfff0707f
> >  /* Vendor-specific (T-Head) XTheadInt instructions. */
> >  #define MATCH_TH_IPOP 0x0050000b
>

  reply	other threads:[~2022-12-16 19:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 18:51 Christoph Muellner
2022-12-16 18:56 ` Palmer Dabbelt
2022-12-16 18:59   ` Christoph Müllner [this message]
2022-12-16 19:00     ` Palmer Dabbelt
2022-12-22  1:50       ` [Offline] " Nelson Chu
2022-12-27 19:45         ` Philipp Tomsich
2022-12-28  1:08           ` Nelson Chu

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='CAEg0e7hOtcTsZLaB7An2yKY5Mu-+3DsEsw6-mzWmftZbs33M=g@mail.gmail.com' \
    --to=christoph.muellner@vrull.eu \
    --cc=andrew@sifive.com \
    --cc=binutils@sourceware.org \
    --cc=cooper.qu@linux.alibaba.com \
    --cc=jim.wilson.gcc@gmail.com \
    --cc=lifang_xia@linux.alibaba.com \
    --cc=nelson@rivosinc.com \
    --cc=palmer@dabbelt.com \
    --cc=philipp.tomsich@vrull.eu \
    --cc=research_trasio@irq.a4lg.com \
    --cc=yunhai@linux.alibaba.com \
    --cc=zhiwei_liu@linux.alibaba.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).