From f80dddbe291b23b6851b22f734e2c421a4f9a4bc Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Mon, 18 Aug 2025 11:19:47 +0200 Subject: 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 --- sysdeps/unix/sysv/linux/i386/____longjmp_chk.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdeps/unix/sysv/linux') diff --git a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S index e468d34..3e09f15 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 -- cgit v1.1