From 3f119b7f774900ce22e9b65068e10aa7bdc7fd91 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Sat, 27 Jan 2024 18:20:03 -0500 Subject: [PATCH] Remove old "check for P4" in sha256-586.pl Historically, OPENSSL_ia32cap_P used reserved bit 20 to trigger some variation in the RC4 implementation. That same bit was used in upstream's f889bb03841c69330d1e14a873c9982d3702f2d0 to disable some optimization on the Pentium 4. We've long since always cleared that flag (see cpu_intel.c), so this is dead code. Remove it. Change-Id: Ib9c0d88235617941833eb8aabb17a4713bdf6606 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/65873 Commit-Queue: David Benjamin Reviewed-by: Bob Beck --- crypto/fipsmodule/sha/asm/sha256-586.pl | 2 -- 1 file changed, 2 deletions(-) diff --git a/crypto/fipsmodule/sha/asm/sha256-586.pl b/crypto/fipsmodule/sha/asm/sha256-586.pl index d23d81fbf..ab821e745 100644 --- a/crypto/fipsmodule/sha/asm/sha256-586.pl +++ b/crypto/fipsmodule/sha/asm/sha256-586.pl @@ -211,8 +211,6 @@ sub BODY_00_15() { &picmeup("edx","OPENSSL_ia32cap_P",$K256,&label("K256")); &mov ("ecx",&DWP(0,"edx")); &mov ("ebx",&DWP(4,"edx")); - &test ("ecx",1<<20); # check for P4 - &jnz (&label("loop")); &mov ("edx",&DWP(8,"edx")) if ($xmm); &test ("ecx",1<<24); # check for FXSR &jz ($unroll_after?&label("no_xmm"):&label("loop"));