2020-06-15 14:18:57 +00:00
|
|
|
#ifndef COSMOPOLITAN_LIBC_NEXGEN32E_VENDOR_H_
|
|
|
|
#define COSMOPOLITAN_LIBC_NEXGEN32E_VENDOR_H_
|
|
|
|
#include "libc/nexgen32e/kcpuids.h"
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
#define IsAuthenticAMD() \
|
|
|
|
(kCpuids[KCPUIDS_0H][KCPUIDS_EBX] == 0x68747541 /* Auth */ && \
|
|
|
|
kCpuids[KCPUIDS_0H][KCPUIDS_EDX] == 0x69746e65 /* enti */ && \
|
|
|
|
kCpuids[KCPUIDS_0H][KCPUIDS_ECX] == 0x444d4163 /* cAMD */)
|
2020-06-15 14:18:57 +00:00
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
#define IsGenuineIntel() \
|
|
|
|
(kCpuids[KCPUIDS_0H][KCPUIDS_EBX] == 0x756e6547 /* Genu */ && \
|
|
|
|
kCpuids[KCPUIDS_0H][KCPUIDS_EDX] == 0x49656e69 /* ineI */ && \
|
|
|
|
kCpuids[KCPUIDS_0H][KCPUIDS_ECX] == 0x6c65746e /* ntel */)
|
|
|
|
|
2020-06-15 14:18:57 +00:00
|
|
|
#endif /* COSMOPOLITAN_LIBC_NEXGEN32E_VENDOR_H_ */
|