* Re: ARM SVE issues with non "standard" vector lengths
       [not found] ` <5c5d4c91-c819-8bb5-2dc7-784cbdbfb789@linaro.org>
@ 2020-04-23 16:24   ` Laurent Desnogues
  2020-04-25 19:28     ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: Laurent Desnogues @ 2020-04-23 16:24 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-arm, qemu-devel@nongnu.org
On Thu, Apr 23, 2020 at 5:19 PM Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 4/23/20 6:59 AM, Laurent Desnogues wrote:
> > 2. sve_zip_p
> >
> > This generates extraneous data in the higher part of the result.
> >
> > I hit this when I got a wrong result on an instruction that ends up
> > using sve_cntp which counts all bits set in each 64-bit chunk. There
> > might be some other instructions beyond ZIP that generate extra data
> > that would break sve_cntp.  So perhaps it'd be easier to fix sve_cmtp
> > (and hope that it's the only function that uses bits beyond vector
> > length...).
>
> There are quite a few places that assume (and some that assert, such as the
> load/store paths) that there are no predicate bits set beyond VL.
>
> I will fix zip.
Looking at the code I think sve_punpk_p is affected too.
Thanks,
Laurent
>
>
> r~
^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: ARM SVE issues with non "standard" vector lengths
       [not found] <CABoDooMSCvi4sxWS-a3cQksD3V5tnHCUbGPsxW69Ou4d1rpQZQ@mail.gmail.com>
       [not found] ` <5c5d4c91-c819-8bb5-2dc7-784cbdbfb789@linaro.org>
@ 2020-04-25 18:49 ` Richard Henderson
  2020-04-25 19:00   ` Richard Henderson
  1 sibling, 1 reply; 4+ messages in thread
From: Richard Henderson @ 2020-04-25 18:49 UTC (permalink / raw)
  To: Laurent Desnogues; +Cc: qemu-arm, qemu-devel
On 4/23/20 6:59 AM, Laurent Desnogues wrote:
> 2. sve_zip_p
> 
> This generates extraneous data in the higher part of the result.
> 
> I hit this when I got a wrong result on an instruction that ends up
> using sve_cntp which counts all bits set in each 64-bit chunk. There
> might be some other instructions beyond ZIP that generate extra data
> that would break sve_cntp.  So perhaps it'd be easier to fix sve_cmtp
> (and hope that it's the only function that uses bits beyond vector
> length...).
I don't see how sve_zip_p can set high bits.  If vl is not a multiple of 512,
it writes in units of uint16_t.  This cannot produce values outside range.
Are you certain that the high bits were not set and left over by some previous
buggy operation, since the uint16_t writes would not clear any extra bits?
r~
^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: ARM SVE issues with non "standard" vector lengths
  2020-04-25 18:49 ` Richard Henderson
@ 2020-04-25 19:00   ` Richard Henderson
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2020-04-25 19:00 UTC (permalink / raw)
  To: Laurent Desnogues; +Cc: qemu-arm, qemu-devel
On 4/25/20 11:49 AM, Richard Henderson wrote:
> On 4/23/20 6:59 AM, Laurent Desnogues wrote:
>> 2. sve_zip_p
>>
>> This generates extraneous data in the higher part of the result.
>>
>> I hit this when I got a wrong result on an instruction that ends up
>> using sve_cntp which counts all bits set in each 64-bit chunk. There
>> might be some other instructions beyond ZIP that generate extra data
>> that would break sve_cntp.  So perhaps it'd be easier to fix sve_cmtp
>> (and hope that it's the only function that uses bits beyond vector
>> length...).
> 
> I don't see how sve_zip_p can set high bits.  If vl is not a multiple of 512,
> it writes in units of uint16_t.  This cannot produce values outside range.
Bah.  I was looking at zip2 first.  zip1 uses the uint64_t path.
I see the problem now.
r~
^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: ARM SVE issues with non "standard" vector lengths
  2020-04-23 16:24   ` ARM SVE issues with non "standard" vector lengths Laurent Desnogues
@ 2020-04-25 19:28     ` Richard Henderson
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2020-04-25 19:28 UTC (permalink / raw)
  To: Laurent Desnogues; +Cc: qemu-arm, qemu-devel@nongnu.org
On 4/23/20 9:24 AM, Laurent Desnogues wrote:
> Looking at the code I think sve_punpk_p is affected too.
Got it.  Same issue as zip1.
r~
^ permalink raw reply	[flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-04-25 19:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CABoDooMSCvi4sxWS-a3cQksD3V5tnHCUbGPsxW69Ou4d1rpQZQ@mail.gmail.com>
     [not found] ` <5c5d4c91-c819-8bb5-2dc7-784cbdbfb789@linaro.org>
2020-04-23 16:24   ` ARM SVE issues with non "standard" vector lengths Laurent Desnogues
2020-04-25 19:28     ` Richard Henderson
2020-04-25 18:49 ` Richard Henderson
2020-04-25 19:00   ` Richard Henderson
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 NNTP newsgroup(s).