From patchwork Mon Jul 11 19:23:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 55926 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CEE7E385801A for ; Mon, 11 Jul 2022 19:24:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CEE7E385801A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1657567449; bh=rh+tyT64E8oIyY5jnX4BxR31sEG6IWXr8FK83TO0AJA=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ONNoeRkgD/kfUh4jch6rvW1ivWQ+WOJ2Zf3pk9AdYvSGN6zgXebNPFKuKPt8Rt8ku gYbbTrt325z7kDGcNB65XVO6vQRjEYx8aljTwoa4lhdqq7qlegrZwEMbFAK+4HAH6f gY0YIx9tvzPz/dNfdkkccLF0UxK0wsfg2Hmcx19E= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by sourceware.org (Postfix) with ESMTPS id DF719385803F for ; Mon, 11 Jul 2022 19:23:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DF719385803F Received: by mail-pg1-x532.google.com with SMTP id s27so5531883pga.13 for ; Mon, 11 Jul 2022 12:23:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=rh+tyT64E8oIyY5jnX4BxR31sEG6IWXr8FK83TO0AJA=; b=cBGgOwNBAoQfxwN3jeFxWrRPCTpKovT1trtKKvIcrlUldDLxlNNqXJbP0rD78OTcTy eaWK1j5fL31c8HUeExtDNnCERmsfIbQcNTigLBUJwd4cS0+X+cL9le5rNIftifkfVDry AWn3Cx3xlvqFRskKGvSdzZ0JmOsd4iAErIqeBBiMDVW6TwuDbXbb4rtY0KI26d7wElIR KzKoKX9TNFNlmRwfbSsV6RDeibGxL0+UO8dcVtyfwnL2delnFEr8CV4IRaN4b4OcQ3w5 aMhmUaOKGqPzK2tGoHaTA5447cZZBL3KisrBP0sVQ57CQNwlkn1LUwUGuz5W31MWir4+ L6dA== X-Gm-Message-State: AJIora/oiRGN+vZvICgWaJN9Zc8ZKyD4PkxLgez5UvxC3LPXo48paiaQ YCSjDZt/5W+tH54iKy30nsA= X-Google-Smtp-Source: AGRyM1vm22v5sNWBBUucfLFHIOcT5rVcPI4dS6s/bfMDPSpZtJYsPLMfAT0e2wOPGGZJxdQqMMpwew== X-Received: by 2002:a63:1c5c:0:b0:414:df9a:7dea with SMTP id c28-20020a631c5c000000b00414df9a7deamr17016001pgm.542.1657567421650; Mon, 11 Jul 2022 12:23:41 -0700 (PDT) Received: from gnu-tgl-3.localdomain ([172.58.37.102]) by smtp.gmail.com with ESMTPSA id g1-20020aa79dc1000000b0052594a3ba89sm2438262pfq.65.2022.07.11.12.23.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 12:23:41 -0700 (PDT) Received: by gnu-tgl-3.localdomain (Postfix, from userid 1000) id 316D0C0305; Mon, 11 Jul 2022 12:23:40 -0700 (PDT) Date: Mon, 11 Jul 2022 12:23:40 -0700 To: GNU C Library Subject: [2.37] [PATCH] x86-64: Use ENTRY_P2ALIGN and END in strcmp-XXX.S Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3027.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Libc-alpha" From: "H.J. Lu" Reply-To: "H.J. Lu" Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" This patch is for 2.37. H.J. --- Replace manual function entry and end with ENTRY_P2ALIGN and END in strcmp-avx2.S, strcmp-evex.S and strcmp-sse42.S. --- sysdeps/x86_64/multiarch/strcmp-avx2.S | 13 ++----------- sysdeps/x86_64/multiarch/strcmp-evex.S | 13 ++----------- sysdeps/x86_64/multiarch/strcmp-sse42.S | 11 ++--------- 3 files changed, 6 insertions(+), 31 deletions(-) diff --git a/sysdeps/x86_64/multiarch/strcmp-avx2.S b/sysdeps/x86_64/multiarch/strcmp-avx2.S index 516cde1145..c4a3529e1d 100644 --- a/sysdeps/x86_64/multiarch/strcmp-avx2.S +++ b/sysdeps/x86_64/multiarch/strcmp-avx2.S @@ -182,9 +182,6 @@ .section SECTION(.text), "ax", @progbits .align 16 - .type STRCMP, @function - .globl STRCMP - # ifndef GLABEL # define GLABEL(...) __VA_ARGS__ # endif @@ -200,12 +197,7 @@ END (GLABEL(STRCASECMP)) /* FALLTHROUGH to strcasecmp/strncasecmp_l. */ # endif - .p2align 4 -STRCMP: - cfi_startproc - _CET_ENDBR - CALL_MCOUNT - +ENTRY_P2ALIGN (STRCMP, 4) # if defined USE_AS_STRCASECMP_L /* We have to fall back on the C implementation for locales with encodings not matching ASCII for single bytes. */ @@ -1315,6 +1307,5 @@ L(ret_less_4_loop): subl %r8d, %eax ret # endif - cfi_endproc - .size STRCMP, .-STRCMP +END (STRCMP) #endif diff --git a/sysdeps/x86_64/multiarch/strcmp-evex.S b/sysdeps/x86_64/multiarch/strcmp-evex.S index e97d51bb26..1976de7ce4 100644 --- a/sysdeps/x86_64/multiarch/strcmp-evex.S +++ b/sysdeps/x86_64/multiarch/strcmp-evex.S @@ -212,9 +212,6 @@ .section .text.evex, "ax", @progbits .align 16 - .type STRCMP, @function - .globl STRCMP - # ifdef USE_AS_STRCASECMP_L ENTRY (STRCASECMP) movq __libc_tsd_LOCALE@gottpoff(%rip), %rax @@ -226,12 +223,7 @@ END (STRCASECMP) /* FALLTHROUGH to strcasecmp/strncasecmp_l. */ # endif - .p2align 4 -STRCMP: - cfi_startproc - _CET_ENDBR - CALL_MCOUNT - +ENTRY_P2ALIGN (STRCMP, 4) # if defined USE_AS_STRCASECMP_L /* We have to fall back on the C implementation for locales with encodings not matching ASCII for single bytes. */ @@ -1411,6 +1403,5 @@ L(ret_less_4_loop): subl %r8d, %eax ret # endif - cfi_endproc - .size STRCMP, .-STRCMP +END (STRCMP) #endif diff --git a/sysdeps/x86_64/multiarch/strcmp-sse42.S b/sysdeps/x86_64/multiarch/strcmp-sse42.S index 60313c647a..3c4639bdea 100644 --- a/sysdeps/x86_64/multiarch/strcmp-sse42.S +++ b/sysdeps/x86_64/multiarch/strcmp-sse42.S @@ -75,8 +75,6 @@ /* Put all SSE 4.2 functions together. */ .section .text.SECTION,"ax",@progbits .align 16 - .type STRCMP_SSE42, @function - .globl STRCMP_SSE42 #ifdef USE_AS_STRCASECMP_L ENTRY (GLABEL(__strcasecmp)) movq __libc_tsd_LOCALE@gottpoff(%rip),%rax @@ -101,11 +99,7 @@ END (GLABEL(__strncasecmp)) #define arg arg -STRCMP_SSE42: - cfi_startproc - _CET_ENDBR - CALL_MCOUNT - +ENTRY_P2ALIGN (STRCMP_SSE42, 0) /* * This implementation uses SSE to compare up to 16 bytes at a time. */ @@ -1737,8 +1731,7 @@ LABEL(Byte0): sub %ecx, %eax ret - cfi_endproc - .size STRCMP_SSE42, .-STRCMP_SSE42 +END (STRCMP_SSE42) #undef UCLOW_reg #undef UCHIGH_reg