wolfSSL SSL/TLS library, support up to TLS1.3
Dependents: CyaSSL-Twitter-OAuth4Tw Example-client-tls-cert TwitterReader TweetTest ... more
wolfssl/wolfcrypt/cpuid.h@15:117db924cf7c, 2018-08-18 (annotated)
- Committer:
- wolfSSL
- Date:
- Sat Aug 18 22:20:43 2018 +0000
- Revision:
- 15:117db924cf7c
- Child:
- 16:8e0d178b1d1e
wolfSSL 3.15.3
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wolfSSL | 15:117db924cf7c | 1 | /* cpuid.h |
wolfSSL | 15:117db924cf7c | 2 | * |
wolfSSL | 15:117db924cf7c | 3 | * Copyright (C) 2006-2017 wolfSSL Inc. |
wolfSSL | 15:117db924cf7c | 4 | * |
wolfSSL | 15:117db924cf7c | 5 | * This file is part of wolfSSL. |
wolfSSL | 15:117db924cf7c | 6 | * |
wolfSSL | 15:117db924cf7c | 7 | * wolfSSL is free software; you can redistribute it and/or modify |
wolfSSL | 15:117db924cf7c | 8 | * it under the terms of the GNU General Public License as published by |
wolfSSL | 15:117db924cf7c | 9 | * the Free Software Foundation; either version 2 of the License, or |
wolfSSL | 15:117db924cf7c | 10 | * (at your option) any later version. |
wolfSSL | 15:117db924cf7c | 11 | * |
wolfSSL | 15:117db924cf7c | 12 | * wolfSSL is distributed in the hope that it will be useful, |
wolfSSL | 15:117db924cf7c | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
wolfSSL | 15:117db924cf7c | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
wolfSSL | 15:117db924cf7c | 15 | * GNU General Public License for more details. |
wolfSSL | 15:117db924cf7c | 16 | * |
wolfSSL | 15:117db924cf7c | 17 | * You should have received a copy of the GNU General Public License |
wolfSSL | 15:117db924cf7c | 18 | * along with this program; if not, write to the Free Software |
wolfSSL | 15:117db924cf7c | 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA |
wolfSSL | 15:117db924cf7c | 20 | */ |
wolfSSL | 15:117db924cf7c | 21 | |
wolfSSL | 15:117db924cf7c | 22 | |
wolfSSL | 15:117db924cf7c | 23 | |
wolfSSL | 15:117db924cf7c | 24 | #ifndef WOLF_CRYPT_CPUID_H |
wolfSSL | 15:117db924cf7c | 25 | #define WOLF_CRYPT_CPUID_H |
wolfSSL | 15:117db924cf7c | 26 | |
wolfSSL | 15:117db924cf7c | 27 | |
wolfSSL | 15:117db924cf7c | 28 | #include <wolfssl/wolfcrypt/types.h> |
wolfSSL | 15:117db924cf7c | 29 | |
wolfSSL | 15:117db924cf7c | 30 | |
wolfSSL | 15:117db924cf7c | 31 | #ifdef __cplusplus |
wolfSSL | 15:117db924cf7c | 32 | extern "C" { |
wolfSSL | 15:117db924cf7c | 33 | #endif |
wolfSSL | 15:117db924cf7c | 34 | |
wolfSSL | 15:117db924cf7c | 35 | #if defined(WOLFSSL_X86_64_BUILD) || defined(USE_INTEL_SPEEDUP) || \ |
wolfSSL | 15:117db924cf7c | 36 | defined(WOLFSSL_AESNI) |
wolfSSL | 15:117db924cf7c | 37 | #define CPUID_AVX1 0x0001 |
wolfSSL | 15:117db924cf7c | 38 | #define CPUID_AVX2 0x0002 |
wolfSSL | 15:117db924cf7c | 39 | #define CPUID_RDRAND 0x0004 |
wolfSSL | 15:117db924cf7c | 40 | #define CPUID_RDSEED 0x0008 |
wolfSSL | 15:117db924cf7c | 41 | #define CPUID_BMI2 0x0010 /* MULX, RORX */ |
wolfSSL | 15:117db924cf7c | 42 | #define CPUID_AESNI 0x0020 |
wolfSSL | 15:117db924cf7c | 43 | #define CPUID_ADX 0x0040 /* ADCX, ADOX */ |
wolfSSL | 15:117db924cf7c | 44 | |
wolfSSL | 15:117db924cf7c | 45 | #define IS_INTEL_AVX1(f) ((f) & CPUID_AVX1) |
wolfSSL | 15:117db924cf7c | 46 | #define IS_INTEL_AVX2(f) ((f) & CPUID_AVX2) |
wolfSSL | 15:117db924cf7c | 47 | #define IS_INTEL_RDRAND(f) ((f) & CPUID_RDRAND) |
wolfSSL | 15:117db924cf7c | 48 | #define IS_INTEL_RDSEED(f) ((f) & CPUID_RDSEED) |
wolfSSL | 15:117db924cf7c | 49 | #define IS_INTEL_BMI2(f) ((f) & CPUID_BMI2) |
wolfSSL | 15:117db924cf7c | 50 | #define IS_INTEL_AESNI(f) ((f) & CPUID_AESNI) |
wolfSSL | 15:117db924cf7c | 51 | #define IS_INTEL_ADX(f) ((f) & CPUID_ADX) |
wolfSSL | 15:117db924cf7c | 52 | |
wolfSSL | 15:117db924cf7c | 53 | void cpuid_set_flags(void); |
wolfSSL | 15:117db924cf7c | 54 | word32 cpuid_get_flags(void); |
wolfSSL | 15:117db924cf7c | 55 | #endif |
wolfSSL | 15:117db924cf7c | 56 | |
wolfSSL | 15:117db924cf7c | 57 | #ifdef __cplusplus |
wolfSSL | 15:117db924cf7c | 58 | } /* extern "C" */ |
wolfSSL | 15:117db924cf7c | 59 | #endif |
wolfSSL | 15:117db924cf7c | 60 | |
wolfSSL | 15:117db924cf7c | 61 | |
wolfSSL | 15:117db924cf7c | 62 | #endif /* WOLF_CRYPT_CPUID_H */ |
wolfSSL | 15:117db924cf7c | 63 |