From patchwork Tue Jun 13 07:00:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajalakshmi S X-Patchwork-Id: 20977 X-Patchwork-Delegate: tuliom@linux.vnet.ibm.com Received: (qmail 105894 invoked by alias); 13 Jun 2017 07:01:10 -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 100711 invoked by uid 89); 13 Jun 2017 07:01:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.4 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= X-HELO: mx0a-001b2d01.pphosted.com From: Rajalakshmi Srinivasaraghavan To: libc-alpha@sourceware.org Cc: Rajalakshmi Srinivasaraghavan Subject: [PATCH] powerpc: refactor strrchr IFUNC Date: Tue, 13 Jun 2017 12:30:56 +0530 X-TM-AS-MML: disable x-cbid: 17061307-0048-0000-0000-00000241FEA2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17061307-0049-0000-0000-000047F221A0 Message-Id: <1497337256-1129-1-git-send-email-raji@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-06-13_03:, , 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-1706130123 As done in commit 6d15a5c2e9450a1e926d5b4991759e1cfa50fccf clean up IFUNC implementation for power8 in order to remove unneeded macro definitions. 2017-06-13 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 | 15 +-------------- sysdeps/powerpc/powerpc64/power8/strrchr.S | 8 ++++++-- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S b/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S index 23365a1..63080f5 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S +++ b/sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S @@ -18,20 +18,7 @@ #include -#undef ENTRY -#define ENTRY(name) \ - .section ".text"; \ - ENTRY_2(__strrchr_power8) \ - .align ALIGNARG(2); \ - BODY_LABEL(__strrchr_power8): \ - cfi_startproc; \ - LOCALENTRY(__strrchr_power8) - -#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 8eb7485..d3cb0bc 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 (strrchr) +ENTRY (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)