From patchwork Wed Jun 21 06:11:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajalakshmi S X-Patchwork-Id: 21156 X-Patchwork-Delegate: tuliom@linux.vnet.ibm.com Received: (qmail 31499 invoked by alias); 21 Jun 2017 06:12:05 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 31461 invoked by uid 89); 21 Jun 2017 06:12:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KHOP_DYNAMIC, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=Hx-languages-length:2252 X-HELO: mx0a-001b2d01.pphosted.com From: Rajalakshmi Srinivasaraghavan To: libc-alpha@sourceware.org Cc: Rajalakshmi Srinivasaraghavan Subject: [PATCHv2] powerpc: refactor strrchr IFUNC Date: Wed, 21 Jun 2017 11:41:53 +0530 X-TM-AS-MML: disable x-cbid: 17062106-0012-0000-0000-0000024A673A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17062106-0013-0000-0000-00000762F657 Message-Id: <1498025513-7282-1-git-send-email-raji@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-06-21_01:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706210101 As done in commit 6d15a5c2e9450a1e926d5b4991759e1cfa50fccf clean up IFUNC implementation for power8 in order to remove unneeded macro definitions. 2017-06-21 Rajalakshmi Srinivasaraghavan * sysdeps/powerpc/powerpc64/multiarch/strchr-power8.S(STRRCHR): Define the implementation-specific function name and remove unneeded macros definition. * sysdeps/powerpc/powerpc64/power8/strrchr.S(STRRCHR): Set a default function name if not defined and pass as parameter to macros accordingly. --- sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S | 18 +----------------- sysdeps/powerpc/powerpc64/power8/strrchr.S | 8 ++++++-- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S b/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S index 2b2b1de..63080f5 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S +++ b/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S @@ -18,23 +18,7 @@ #include -#undef ENTRY_TOCLESS -#ifndef PROF -#define ENTRY_TOCLESS(name, ...) \ - ENTRY_3 __strrchr_power8, ## __VA_ARGS__; \ - cfi_startproc -#else -#define ENTRY_TOCLESS(name, ...) \ - ENTRY_3 __strrchr_power8, ## __VA_ARGS__; \ - cfi_startproc; \ - LOCALENTRY(__strrchr_power8) -#endif - -#undef END -#define END(name) \ - cfi_endproc; \ - TRACEBACK(__strrchr_power8); \ - END_2(__strrchr_power8) +#define STRRCHR __strrchr_power8 #undef libc_hidden_builtin_def #define libc_hidden_builtin_def(name) diff --git a/sysdeps/powerpc/powerpc64/power8/strrchr.S b/sysdeps/powerpc/powerpc64/power8/strrchr.S index 0ba6138..0c7c900 100644 --- a/sysdeps/powerpc/powerpc64/power8/strrchr.S +++ b/sysdeps/powerpc/powerpc64/power8/strrchr.S @@ -76,8 +76,12 @@ 1: \ vsumsws v2, v2, v0; #endif /* !__LITTLE_ENDIAN__ */ + +#ifndef STRRCHR +# define STRRCHR strrchr +#endif .machine power7 -ENTRY_TOCLESS (strrchr) +ENTRY_TOCLESS (STRRCHR) CALL_MCOUNT 2 dcbt 0,r3 clrrdi r8,r3,3 /* Align the address to doubleword boundary. */ @@ -459,6 +463,6 @@ L(continue1): #endif add r3, r3, r6 /* Compute final length. */ blr -END (strrchr) +END (STRRCHR) weak_alias (strrchr, rindex) libc_hidden_builtin_def (strrchr)