This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] x86-64: memcmp-avx2-movbe.S needs saturating subtraction [BZ #21662]
- From: Florian Weimer <fweimer at redhat dot com>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 23 Jun 2017 18:42:39 +0200
- Subject: Re: [PATCH] x86-64: memcmp-avx2-movbe.S needs saturating subtraction [BZ #21662]
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 68DD7142873
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 68DD7142873
- References: <20170623132026.82F2D4017D45E@oldenburg.str.redhat.com> <6fec374c-177f-b8e8-d7a3-ab10d7dab136@redhat.com> <5c63ea37-7fe6-79f3-de42-9146ae084269@redhat.com>
On 06/23/2017 06:38 PM, Carlos O'Donell wrote:
> I assume that this catches the regression by ensuring the high values of
> the subtraction result in an underflow which results in a positive value
> of the subtraction and a wrong answer?
Yes, I thought I said so in the commit message.
> Was this comment ever accurate? mobzwl is not a BE load.
We used bswap, so the register contents before the comparison is in
big-endian format.
>> + orl %edi, %eax
>> + orl %esi, %ecx
>> + /* Subtraction is okay because the upper 8 bits a zero. */
>
> s/a zero/are zero/g
Okay, I'll fix this typo in a follow-up commit.
I won't work on the error → printf cleanup for now. HJ asked that they
should be put into a separate commit.
Thanks,
Florian