From: Uros Bizjak Date: Mon, 18 Aug 2025 09:19:47 +0000 (+0200) Subject: i386: Use TESTB instead of TESTL in ____longjmp_chk() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f80dddbe291b23b6851b22f734e2c421a4f9a4bc;p=thirdparty%2Fglibc.git i386: Use TESTB instead of TESTL in ____longjmp_chk() There is no need to use TESTL when checking the least-significant bit with a TEST instruction. Use TESTB, which is three bytes shorter: f6 44 24 04 01 testb $0x1,0x4(%esp) vs: f7 44 24 04 01 00 00 testl $0x1,0x4(%esp) 00 for the same effect. No functional changes intended. Signed-off-by: Uros Bizjak Cc: H.J.Lu Cc: Carlos O'Donell Reviewed-by: H.J. Lu --- diff --git a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S index e468d346d6..3e09f15662 100644 --- a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S @@ -67,7 +67,7 @@ ENTRY (____longjmp_chk) /* Without working sigaltstack we cannot perform the test. */ test %eax, %eax jne .Lok2 - testl $1, 4(%esp) + testb $1, 4(%esp) jz .Lfail movl (%esp), %eax