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