[2.37] x86-64: Use ENTRY_P2ALIGN and END in strcmp-XXX.S

Message ID Ysx4vIagf8krJCNf@gmail.com
State Not applicable
Headers
Series [2.37] x86-64: Use ENTRY_P2ALIGN and END in strcmp-XXX.S |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent
dj/TryBot-32bit fail Patch caused testsuite regressions

Commit Message

H.J. Lu July 11, 2022, 7:23 p.m. UTC
  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(-)
  

Patch

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