public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Matheus Castanho <msc@linux.ibm.com>
To: Raphael M Zinsly <rzinsly@linux.ibm.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH 2/2] powerpc: Add optimized rawmemchr for POWER10
Date: Fri, 14 May 2021 10:30:40 -0300	[thread overview]
Message-ID: <87bl9d1m8n.fsf@linux.ibm.com> (raw)
In-Reply-To: <2531e30b-8f2c-8364-63ff-e24cb693e1a8@linux.ibm.com>


Raphael M Zinsly <rzinsly@linux.ibm.com> writes:

> Hi Matheus, adding the commentary bellow the patch LGTM, thanks!
>
> On 12/05/2021 11:27, Matheus Castanho via Libc-alpha wrote:
>> ...
>> @@ -50,19 +90,13 @@
>>   	li	  r6,offset;		    \
>>   	LXVP(v4+32,offset,addr);	    \
>>   	LXVP(v6+32,offset+32,addr);	    \
>> +	RAWMEMCHR_SUBTRACT_VECTORS;	    \
>>   	vminub	  v14,v4,v5;		    \
>>   	vminub	  v15,v6,v7;		    \
>>   	vminub	  v16,v14,v15;		    \
>> -	vcmpequb. v0,v16,v18;		    \
>> +	vcmpequb. v0,v16,VREG_ZERO;	    \
>>   	bne	  cr6,L(label)
>> -#define TAIL(vreg,increment)	   \
>> -	vctzlsbb  r4,vreg;	   \
>> -	subf	  r3,r3,r5;	   \
>> -	addi	  r4,r4,increment; \
>> -	add	  r3,r3,r4;	   \
>> -	blr
>> -
>>   /* Implements the function
>>      int [r3] strlen (const void *s [r3])
>
> Missing the rawmemchar "definition" here.
>
>
> Regards,

What about this?

    /* Implements the function

       int [r3] strlen (const void *s [r3])

       but when USE_AS_RAWMEMCHR is set, implements the function

       void* [r3] rawmemchr (const void *s [r3], int c [r4])

       The implementation can load bytes past a matching byte, but only
       up to the next 64B boundary, so it never crosses a page.  */

--
Matheus Castanho

  reply	other threads:[~2021-05-14 13:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-12 14:27 [PATCH 1/2] benchtests: Use JSON for bench-rawmemchr output Matheus Castanho
2021-05-12 14:27 ` [PATCH 2/2] powerpc: Add optimized rawmemchr for POWER10 Matheus Castanho
2021-05-13 13:32   ` Raphael M Zinsly
2021-05-14 13:30     ` Matheus Castanho [this message]
2021-05-14 13:53       ` Raphael M Zinsly
2021-05-13 19:57   ` Lucas A. M. Magalhaes
2021-05-17 14:05   ` Matheus Castanho
2021-05-12 18:57 ` [PATCH 1/2] benchtests: Use JSON for bench-rawmemchr output Lucas A. M. Magalhaes
2021-05-17 14:22   ` Matheus Castanho

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=87bl9d1m8n.fsf@linux.ibm.com \
    --to=msc@linux.ibm.com \
    --cc=libc-alpha@sourceware.org \
    --cc=rzinsly@linux.ibm.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).