From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58513 invoked by alias); 9 Feb 2017 15:26:14 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 56397 invoked by uid 89); 9 Feb 2017 15:26:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=vr, Eight, sk:Sriniva, sk:sriniva X-HELO: mx0a-001b2d01.pphosted.com Date: Thu, 09 Feb 2017 15:26:00 -0000 From: "Gabriel F. T. Gomes" To: Rajalakshmi Srinivasaraghavan Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] powerpc64: strrchr optimization for power8 In-Reply-To: <1486616454-14704-1-git-send-email-raji@linux.vnet.ibm.com> References: <1486616454-14704-1-git-send-email-raji@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17020915-0028-0000-0000-00000193B68B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17020915-0029-0000-0000-0000148FE69B Message-Id: <20170209132556.2d156d89@keller> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-09_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702090139 X-SW-Source: 2017-02/txt/msg00184.txt.bz2 Hi, I have a few cosmetic comments... On Thu, 9 Feb 2017 10:30:54 +0530 Rajalakshmi Srinivasaraghavan 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.