public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nelson Chu <nelson@rivosinc.com>
To: Kiva Oyama <libkernelpanic@gmail.com>
Cc: Jan Beulich <jbeulich@suse.com>, binutils@sourceware.org
Subject: Re: [RISCV] [GNU AS] Possible `vmsge{u}.vx` instruction lowering bug?
Date: Fri, 1 Sep 2023 16:03:13 +0800	[thread overview]
Message-ID: <CAPpQWtCSur2gA99dOjLm-uvTJDJ9xRboaV_ORnC68b8QoFJAyw@mail.gmail.com> (raw)
In-Reply-To: <CA+fTAJq-jjsHqY_U5wZrDU=YwTX8miCAKbzNX2t_GQvJFf8gJQ@mail.gmail.com>

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

Thanks for both your clarifications, committed.

Thanks
Nelson

On Fri, Sep 1, 2023 at 2:37 PM Kiva Oyama <libkernelpanic@gmail.com> wrote:

> >  Is the following expected?
>
> Yes.
>
> > Seems "vd is any" also has the same issue.
>
> I rechecked the spec, for every masked vmsge{u}.vx, the lowered
> instruction is only masked when `vd != v0`.
> So your patch does fix these two problems.
>
> Thank you for clarifying.
>
> Best Regards,
> Kiva Oyama
>
> On Wed, Aug 30, 2023 at 1:51 PM Jan Beulich <jbeulich@suse.com> wrote:
>
>> On 30.08.2023 04:51, Nelson Chu wrote:
>> > Hi Jan,
>> > Thanks for pointing that out.
>> >
>> > Hi Kiva,
>> > Maybe you can send a better patch for this issue if you are interested,
>> > including what Jan suggested.  Thanks :-)
>>
>> Hmm, both of your replies above make me suspect a misunderstanding: I
>> think your patch does exactly what is needed.
>>
>> Jan
>>
>> > On Tue, Aug 29, 2023 at 4:52 PM Jan Beulich <jbeulich@suse.com> wrote:
>> >
>> >> On 29.08.2023 09:59, Nelson Chu wrote:
>> >>> Is the following expected?
>> >>
>> >> I think so, but Kiva - please confirm.
>> >>
>> >>>  Seems "vd is any" also has the same issue.
>> >>
>> >> Right, that's what ...
>> >>
>> >>>> I think this wants fixing alike in binutils: From looking at
>> >>>> vector_macro(),
>> >>>> it appears that emitting the masked form is merely an accident
>> resulting
>> >>>> from the inverted encoding of "masking". In particular, if masking
>> was
>> >>>> indeed meant, I expect code there would be
>> >>>>
>> >>>>                   if (vd == vm)
>> >>>>                     {
>> >>>>                       macro_build (NULL, "vmslt.vx", "Vd,Vt,sVm",
>> vtemp,
>> >>>> vs2, vs1, vm);
>> >>>>                       macro_build (NULL, "vmandnot.mm", "Vd,Vt,Vs",
>> vd,
>> >>>> vm, vtemp);
>> >>>>                     }
>> >>>>                   else
>> >>>>                     ...
>> >>>>
>> >>>> much like it is a few lines down from there. (Apparently the "else"
>> path
>> >>>> omitted above is similarly affected.)
>> >>
>> >> ... I was referring to with the parenthesized sentence.
>> >>
>> >> Jan
>> >>
>> >
>>
>>

      reply	other threads:[~2023-09-01  8:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29  6:52 im Kiva
2023-08-29  7:43 ` Jan Beulich
2023-08-29  7:59   ` Nelson Chu
2023-08-29  8:52     ` Jan Beulich
2023-08-30  2:51       ` Nelson Chu
2023-08-30  5:50         ` Jan Beulich
2023-09-01  6:37           ` Kiva Oyama
2023-09-01  8:03             ` Nelson Chu [this message]

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=CAPpQWtCSur2gA99dOjLm-uvTJDJ9xRboaV_ORnC68b8QoFJAyw@mail.gmail.com \
    --to=nelson@rivosinc.com \
    --cc=binutils@sourceware.org \
    --cc=jbeulich@suse.com \
    --cc=libkernelpanic@gmail.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).