diff options
author | appro <appro> | 2007-07-23 16:18:36 +0000 |
---|---|---|
committer | appro <appro> | 2007-07-23 16:18:36 +0000 |
commit | e95509292a3dccf187eb557fe1edb452eac6b3a2 (patch) | |
tree | 7f4f851cb60add4bb7d85b2b04116922713a454c | |
parent | b2771558491d2f3070503f729bb215aa37d62324 (diff) | |
download | openssl-e95509292a3dccf187eb557fe1edb452eac6b3a2.tar.gz |
x86*cpuid update [from HEAD].
-rw-r--r-- | crypto/x86_64cpuid.pl | 4 | ||||
-rw-r--r-- | crypto/x86cpuid.pl | 13 |
2 files changed, 8 insertions, 9 deletions
diff --git a/crypto/x86_64cpuid.pl b/crypto/x86_64cpuid.pl index 2616a03da..0c5d3397d 100644 --- a/crypto/x86_64cpuid.pl +++ b/crypto/x86_64cpuid.pl @@ -136,11 +136,11 @@ OPENSSL_ia32_cpuid: cpuid cmp \$0,%r9d jne .Lnotintel - or \$0x00100000,%edx # use reserved 20th bit to engage RC4_CHAR + or \$1<<20,%edx # use reserved bit to engage RC4_CHAR and \$15,%ah cmp \$15,%ah # examine Family ID je .Lnotintel - or \$0x40000000,%edx # use reserved bit to skip unrolled loop + or \$1<<30,%edx # use reserved bit to skip unrolled loop .Lnotintel: bt \$28,%edx # test hyper-threading bit jnc .Ldone diff --git a/crypto/x86cpuid.pl b/crypto/x86cpuid.pl index 4408ef293..6bf6a7b57 100644 --- a/crypto/x86cpuid.pl +++ b/crypto/x86cpuid.pl @@ -24,28 +24,27 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } &cpuid (); &xor ("eax","eax"); &cmp ("ebx",0x756e6547); # "Genu" - &data_byte(0x0f,0x95,0xc0); #&setne (&LB("eax")); + &setne (&LB("eax")); &mov ("ebp","eax"); &cmp ("edx",0x49656e69); # "ineI" - &data_byte(0x0f,0x95,0xc0); #&setne (&LB("eax")); + &setne (&LB("eax")); &or ("ebp","eax"); &cmp ("ecx",0x6c65746e); # "ntel" - &data_byte(0x0f,0x95,0xc0); #&setne (&LB("eax")); + &setne (&LB("eax")); &or ("ebp","eax"); &mov ("eax",1); &cpuid (); &cmp ("ebp",0); &jne (&label("notP4")); - &and ("eax",15<<8); # familiy ID - &cmp ("eax",15<<8); # P4? + &and (&HB("eax"),15); # familiy ID + &cmp (&HB("eax"),15); # P4? &jne (&label("notP4")); &or ("edx",1<<20); # use reserved bit to engage RC4_CHAR &set_label("notP4"); &bt ("edx",28); # test hyper-threading bit &jnc (&label("done")); &shr ("ebx",16); - &and ("ebx",0xff); - &cmp ("ebx",1); # see if cache is shared(*) + &cmp (&LB("ebx"),1); # see if cache is shared(*) &ja (&label("done")); &and ("edx",0xefffffff); # clear hyper-threading bit if not &set_label("done"); |