summaryrefslogtreecommitdiffstats
path: root/src/cpuid.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpuid.h')
-rw-r--r--src/cpuid.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cpuid.h b/src/cpuid.h
index 546c258..9382156 100644
--- a/src/cpuid.h
+++ b/src/cpuid.h
@@ -23,17 +23,30 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/**
+ \file
+
+ CPUID function for x86-based platforms
+*/
#pragma once
#include <stdint.h>
+/** The FXSR bit in the CPUID return value */
#define CPUID_FXSR ((uint64_t)1 << 24)
+
+/** The SSE2 bit in the CPUID return value */
#define CPUID_SSE2 ((uint64_t)1 << 26)
+
+/** The PCLMULQDQ bit in the CPUID return value */
#define CPUID_PCLMULQDQ ((uint64_t)1 << 33)
+
+/** The SSSE3 bit in the CPUID return value */
#define CPUID_SSSE3 ((uint64_t)1 << 41)
+/** Returns the ECX and EDX return values of CPUID function 1 as a single uint64 */
static inline uint64_t fastd_cpuid(void) {
unsigned eax, ebx, ecx, edx;