This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] powerpc64: strrchr optimization for power8


Hi,

I have a few cosmetic comments...

On Thu,  9 Feb 2017 10:30:54 +0530
Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com> wrote:

> +/* int [r3] strrchr (char *s [r3], int c [r4])  */
      ~~~
Should it be char *, instead?

> +#define MTVRD(v,r) .long (0x7c000167 | ((v)<<(32-11)) | ((r)<<(32-16)))
> +#define MFVRD(r,v) .long (0x7c000067 | ((v)<<(32-11)) | ((r)<<(32-16)))
> +#define VBPERMQ(t,a,b)  .long (0x1000054c \
> +                        | ((t)<<(32-11)) \
> +                        | ((a)<<(32-16)) \
> +                        | ((b)<<(32-21)) )
   ~~~~~~~~~~~~~~~~~~~~~~~~
Eight spaces should be replaced with tabs.

> +#define VCLZD(r,v) .long (0x100007c2 | ((r)<<(32-11)) | ((v)<<(32-21)))
> +#define VPOPCNTD(r,v) .long (0x100007c3 | ((r)<<(32-11)) | ((v)<<(32-21)))
> +#define VADDUQM(t,a,b)  .long (0x10000100 \
> +                        | ((t)<<(32-11)) \
> +                        | ((a)<<(32-16)) \
> +                        | ((b)<<(32-21)) )
   ~~~~~~~~~~~~~~~~~~~~~~~~
Likewise.

> +	/* r4 is changed now ,if its passed as more chars
                            ^
now, if

> +	li	r5, 16
> +	vspltb	v1, v1, 7
> +        /* Compare 32 bytes in each loop.  */
   ~~~~~~~~
Eight spaces should be replaced with tabs.


> +	blt	cr6, L(match)
> +
> +        /* One (or both) of the quadwords contains c/null.  */
   ~~~~~~~~
Likewise.

> +
> +L(match):
> +        /* One (or both) of the quadwords contains a match.  */
   ~~~~~~~~
Likewise.

> +	vslb	v10, v11, v10
> +	li	r5, 16
> +        /* Compare 32 bytes in each loop.  */
   ~~~~~~~~
Likewise.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]