diff options
author | Andy Polyakov <appro@openssl.org> | 2016-04-23 19:10:04 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2016-04-25 11:50:54 +0200 |
commit | 299ccadcdb99001c618d188fb243c1caaaa86a1c (patch) | |
tree | cdb80f1346d4357335e55ca4440946834a154b28 /crypto/sparcv9cap.c | |
parent | a82a9f71ad0149380a680cae4c0cc693e6324679 (diff) | |
download | openssl-299ccadcdb99001c618d188fb243c1caaaa86a1c.tar.gz |
crypto/sparc_arch.h: reserve more SPARCv9 capability bits.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/sparcv9cap.c')
-rw-r--r-- | crypto/sparcv9cap.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/crypto/sparcv9cap.c b/crypto/sparcv9cap.c index e1e6d73955..30c384b04d 100644 --- a/crypto/sparcv9cap.c +++ b/crypto/sparcv9cap.c @@ -149,17 +149,24 @@ void OPENSSL_cpuid_setup(void) unsigned int vec[1]; if (getisax (vec,1)) { - if (vec[0]&0x0020) OPENSSL_sparcv9cap_P[0] |= SPARCV9_VIS1; - if (vec[0]&0x0040) OPENSSL_sparcv9cap_P[0] |= SPARCV9_VIS2; - if (vec[0]&0x0080) OPENSSL_sparcv9cap_P[0] |= SPARCV9_BLK; - if (vec[0]&0x0100) OPENSSL_sparcv9cap_P[0] |= SPARCV9_FMADD; - if (vec[0]&0x0400) OPENSSL_sparcv9cap_P[0] |= SPARCV9_VIS3; + if (vec[0]&0x00020) OPENSSL_sparcv9cap_P[0] |= SPARCV9_VIS1; + if (vec[0]&0x00040) OPENSSL_sparcv9cap_P[0] |= SPARCV9_VIS2; + if (vec[0]&0x00080) OPENSSL_sparcv9cap_P[0] |= SPARCV9_BLK; + if (vec[0]&0x00100) OPENSSL_sparcv9cap_P[0] |= SPARCV9_FMADD; + if (vec[0]&0x00400) OPENSSL_sparcv9cap_P[0] |= SPARCV9_VIS3; + if (vec[0]&0x01000) OPENSSL_sparcv9cap_P[0] |= SPARCV9_FJHPCACE; + if (vec[0]&0x02000) OPENSSL_sparcv9cap_P[0] |= SPARCV9_FJDESX; + if (vec[0]&0x08000) OPENSSL_sparcv9cap_P[0] |= SPARCV9_IMA; if (vec[0]&0x10000) OPENSSL_sparcv9cap_P[0] |= SPARCV9_FJAESX; + if (vec[1]&0x00008) OPENSSL_sparcv9cap_P[0] |= SPARCV9_VIS4; /* reconstruct %cfr copy */ OPENSSL_sparcv9cap_P[1] = (vec[0]>>17)&0x3ff; OPENSSL_sparcv9cap_P[1] |= (OPENSSL_sparcv9cap_P[1]&CFR_MONTMUL)<<1; if (vec[0]&0x20000000) OPENSSL_sparcv9cap_P[1] |= CFR_CRC32C; + if (vec[1]&0x00000020) OPENSSL_sparcv9cap_P[1] |= CFR_XMPMUL; + if (vec[1]&0x00000040) + OPENSSL_sparcv9cap_P[1] |= CFR_XMONTMUL|CFR_XMONTSQR; /* Some heuristics */ /* all known VIS2-capable CPUs have unprivileged tick counter */ |