2020-06-15 14:18:57 +00:00
|
|
|
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
|
2023-12-08 03:11:56 +00:00
|
|
|
│ vi: set et ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi │
|
2020-06-15 14:18:57 +00:00
|
|
|
╞══════════════════════════════════════════════════════════════════════════════╡
|
|
|
|
│ Copyright 2020 Justine Alexandra Roberts Tunney │
|
|
|
|
│ │
|
2020-12-28 01:18:44 +00:00
|
|
|
│ Permission to use, copy, modify, and/or distribute this software for │
|
|
|
|
│ any purpose with or without fee is hereby granted, provided that the │
|
|
|
|
│ above copyright notice and this permission notice appear in all copies. │
|
2020-06-15 14:18:57 +00:00
|
|
|
│ │
|
2020-12-28 01:18:44 +00:00
|
|
|
│ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL │
|
|
|
|
│ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED │
|
|
|
|
│ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE │
|
|
|
|
│ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL │
|
|
|
|
│ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR │
|
|
|
|
│ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER │
|
|
|
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
|
|
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
2020-06-15 14:18:57 +00:00
|
|
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
2022-05-19 07:34:15 +00:00
|
|
|
#include "libc/intrin/kprintf.h"
|
2020-11-25 16:19:00 +00:00
|
|
|
#include "libc/log/color.internal.h"
|
2023-04-27 03:45:01 +00:00
|
|
|
#include "libc/mem/gc.h"
|
2020-11-25 16:19:00 +00:00
|
|
|
#include "libc/nexgen32e/cpuid4.internal.h"
|
2020-06-15 14:18:57 +00:00
|
|
|
#include "libc/nexgen32e/nexgen32e.h"
|
|
|
|
#include "libc/nexgen32e/rdtscp.h"
|
|
|
|
#include "libc/nexgen32e/x86feature.h"
|
|
|
|
#include "libc/nexgen32e/x86info.h"
|
2023-06-10 01:02:06 +00:00
|
|
|
#include "libc/runtime/runtime.h"
|
2020-06-15 14:18:57 +00:00
|
|
|
#include "libc/stdio/stdio.h"
|
2024-05-05 06:05:36 +00:00
|
|
|
#include "libc/time.h"
|
2022-09-13 06:10:38 +00:00
|
|
|
#include "libc/x/xasprintf.h"
|
2020-06-15 14:18:57 +00:00
|
|
|
#include "tool/decode/lib/idname.h"
|
|
|
|
#include "tool/decode/lib/x86idnames.h"
|
2023-05-14 16:32:15 +00:00
|
|
|
#ifdef __x86_64__
|
2020-06-15 14:18:57 +00:00
|
|
|
|
|
|
|
#define CANIUSE(FEATURE) caniuse(#FEATURE, X86_HAVE(FEATURE))
|
|
|
|
#define SHOW(CONSTANT) show(#CONSTANT, CONSTANT)
|
|
|
|
|
2024-07-04 09:45:45 +00:00
|
|
|
static void cpuid(unsigned leaf, unsigned subleaf, unsigned *eax, unsigned *ebx,
|
|
|
|
unsigned *ecx, unsigned *edx) {
|
|
|
|
asm("movq\t%%rbx,%%rsi\n\t"
|
|
|
|
"cpuid\n\t"
|
|
|
|
"xchgq\t%%rbx,%%rsi"
|
|
|
|
: "=a"(*eax), "=S"(*ebx), "=c"(*ecx), "=d"(*edx)
|
|
|
|
: "0"(leaf), "2"(subleaf));
|
|
|
|
}
|
|
|
|
|
2020-06-15 14:18:57 +00:00
|
|
|
static void caniuse(const char *feature, bool present) {
|
|
|
|
printf("%-20s%s%s%s\n", feature, present ? GREEN : RED,
|
|
|
|
present ? "present" : "unavailable", RESET);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void show(const char *constant, long value) {
|
|
|
|
printf("%-20s%#lx\n", constant, value);
|
|
|
|
}
|
|
|
|
|
2021-08-13 18:18:25 +00:00
|
|
|
static void decimal(const char *a, long b, const char *c) {
|
|
|
|
printf("%-20s%ld%s\n", a, b, c);
|
|
|
|
}
|
|
|
|
|
2020-06-15 14:18:57 +00:00
|
|
|
static void showvendor(void) {
|
|
|
|
printf("%.*s%.*s%.*s", 4, &KCPUIDS(0H, EBX), 4, &KCPUIDS(0H, EDX), 4,
|
|
|
|
&KCPUIDS(0H, ECX));
|
|
|
|
}
|
|
|
|
|
|
|
|
static void showmodel(void) {
|
|
|
|
if (getx86processormodel(kX86ProcessorModelKey)) {
|
|
|
|
printf(" %s",
|
|
|
|
findnamebyid(kX86MarchNames,
|
|
|
|
getx86processormodel(kX86ProcessorModelKey)->march));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void showstrata(void) {
|
|
|
|
if (getx86processormodel(kX86ProcessorModelKey)) {
|
|
|
|
printf(" (%s %s)",
|
|
|
|
findnamebyid(kX86GradeNames,
|
|
|
|
getx86processormodel(kX86ProcessorModelKey)->grade),
|
|
|
|
"Grade");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-07-04 09:45:45 +00:00
|
|
|
void showcachesizes_intel(void) {
|
2020-06-15 14:18:57 +00:00
|
|
|
unsigned i;
|
|
|
|
CPUID4_ITERATE(i, {
|
2024-01-09 09:54:26 +00:00
|
|
|
printf("%-19s%s%s %2u-way %,9u byte cache w/%s %,6u sets of %u byte lines "
|
2020-06-15 14:18:57 +00:00
|
|
|
"shared across %u threads\n",
|
2024-01-08 18:07:35 +00:00
|
|
|
gc(xasprintf("Level %u%s", CPUID4_CACHE_LEVEL,
|
|
|
|
CPUID4_CACHE_TYPE == 1 ? " data"
|
|
|
|
: CPUID4_CACHE_TYPE == 2 ? " code"
|
|
|
|
: "")),
|
2020-06-15 14:18:57 +00:00
|
|
|
CPUID4_IS_FULLY_ASSOCIATIVE ? " fully-associative" : "",
|
|
|
|
CPUID4_COMPLEX_INDEXING ? " complexly-indexed" : "",
|
|
|
|
CPUID4_WAYS_OF_ASSOCIATIVITY, CPUID4_CACHE_SIZE_IN_BYTES,
|
|
|
|
CPUID4_PHYSICAL_LINE_PARTITIONS > 1
|
2024-01-08 18:07:35 +00:00
|
|
|
? gc(xasprintf(" %u physically partitioned"))
|
2020-06-15 14:18:57 +00:00
|
|
|
: "",
|
|
|
|
CPUID4_NUMBER_OF_SETS, CPUID4_SYSTEM_COHERENCY_LINE_SIZE,
|
|
|
|
CPUID4_MAX_THREADS_SHARING_CACHE);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-07-04 09:45:45 +00:00
|
|
|
static const char *const kAmdAssociativityStr[16] = {
|
|
|
|
"Disabled", //
|
|
|
|
"1 way (direct mapped)", //
|
|
|
|
"2 way", //
|
|
|
|
"4 way", //
|
|
|
|
"8 way", //
|
|
|
|
"16 way", //
|
|
|
|
"32 way", //
|
|
|
|
"48 way", //
|
|
|
|
"64 way", //
|
|
|
|
"96 way", //
|
|
|
|
"128 way", //
|
|
|
|
"Fully Associative", //
|
|
|
|
};
|
|
|
|
|
|
|
|
void showcachesizes_amd() {
|
|
|
|
unsigned eax, ebx, ecx, edx;
|
|
|
|
|
|
|
|
cpuid(0x80000005, 0, &eax, &ebx, &ecx, &edx);
|
|
|
|
|
|
|
|
unsigned L1_dataCache_size = (ecx >> 24) & 0xff;
|
|
|
|
unsigned L1_dataCache_associativity = (ecx >> 16) & 0xff;
|
|
|
|
unsigned L1_dataCache_linesPerTag = (ecx >> 8) & 0xff;
|
|
|
|
unsigned L1_dataCache_lineSize = (ecx >> 0) & 0xff;
|
|
|
|
|
|
|
|
unsigned L1_instrCache_size = (ecx >> 24) & 0xff;
|
|
|
|
unsigned L1_instrCache_associativity = (ecx >> 16) & 0xff;
|
|
|
|
unsigned L1_instrCache_linesPerTag = (ecx >> 8) & 0xff;
|
|
|
|
unsigned L1_instrCache_lineSize = (ecx >> 0) & 0xff;
|
|
|
|
|
|
|
|
cpuid(0x80000006, 0, &eax, &ebx, &ecx, &edx);
|
|
|
|
|
|
|
|
unsigned L2_size = (ecx >> 16) & 0xffff;
|
|
|
|
unsigned L2_associativity = (ecx >> 12) & 0xf;
|
|
|
|
unsigned L2_linesPerTag = (ecx >> 8) & 0xf;
|
|
|
|
unsigned L2_lineSize = (ecx >> 0) & 0xff;
|
|
|
|
|
|
|
|
unsigned L3_size = (edx >> 18) & 0x3fff;
|
|
|
|
unsigned L3_associativity = (edx >> 12) & 0xf;
|
|
|
|
unsigned L3_linesPerTag = (edx >> 8) & 0xf;
|
|
|
|
unsigned L3_lineSize = (edx >> 0) & 0xff;
|
|
|
|
|
|
|
|
printf("L1 Data Cache:\n"
|
|
|
|
"\tSize: %d KB\n"
|
|
|
|
"\tAssociativity: %d way\n"
|
|
|
|
"\tLines per Tag: %d\n"
|
|
|
|
"\tLine Size: %d B\n"
|
|
|
|
"\n"
|
|
|
|
"L1 Instruction Cache:\n"
|
|
|
|
"\tSize: %d KB\n"
|
|
|
|
"\tAssociativity: %d way\n"
|
|
|
|
"\tLines per Tag: %d\n"
|
|
|
|
"\tLine Size: %d B\n",
|
|
|
|
L1_dataCache_size, L1_dataCache_associativity,
|
|
|
|
L1_dataCache_linesPerTag, L1_dataCache_lineSize, L1_instrCache_size,
|
|
|
|
L1_instrCache_associativity, L1_instrCache_linesPerTag,
|
|
|
|
L1_instrCache_lineSize);
|
|
|
|
|
|
|
|
printf("L2 Cache:\n"
|
|
|
|
"\tSize: %d KB\n"
|
|
|
|
"\tAssociativity: %s\n"
|
|
|
|
"\tLines per Tag: %d\n"
|
|
|
|
"\tLine Size: %d B\n"
|
|
|
|
"\n"
|
|
|
|
"L3 Cache:\n"
|
|
|
|
"\tSize: %d KB\n"
|
|
|
|
"\tAssociativity: %s\n"
|
|
|
|
"\tLines per Tag: %d\n"
|
|
|
|
"\tLine Size: %d B\n",
|
|
|
|
L2_size, kAmdAssociativityStr[L2_associativity & 15], L2_linesPerTag,
|
|
|
|
L2_lineSize, L3_size * 512,
|
|
|
|
kAmdAssociativityStr[L3_associativity & 15], L3_linesPerTag,
|
|
|
|
L3_lineSize);
|
|
|
|
}
|
|
|
|
|
2020-06-15 14:18:57 +00:00
|
|
|
int main(int argc, char *argv[]) {
|
2021-08-13 18:18:25 +00:00
|
|
|
int x;
|
2020-06-15 14:18:57 +00:00
|
|
|
long tsc_aux;
|
2022-05-19 07:34:15 +00:00
|
|
|
ShowCrashReports();
|
2020-06-15 14:18:57 +00:00
|
|
|
|
|
|
|
showvendor();
|
|
|
|
showmodel();
|
|
|
|
showstrata();
|
|
|
|
printf("\n");
|
|
|
|
|
2021-08-13 18:18:25 +00:00
|
|
|
if (KCPUIDS(16H, EAX)) {
|
|
|
|
printf("\n");
|
Apply clang-format update to repo (#1154)
Commit bc6c183 introduced a bunch of discrepancies between what files
look like in the repo and what clang-format says they should look like.
However, there were already a few discrepancies prior to that. Most of
these discrepancies seemed to be unintentional, but a few of them were
load-bearing (e.g., a #include that violated header ordering needing
something to have been #defined by a 'later' #include.)
I opted to take what I hope is a relatively smooth-brained approach: I
reverted the .clang-format change, ran clang-format on the whole repo,
reapplied the .clang-format change, reran clang-format again, and then
reverted the commit that contained the first run. Thus the full effect
of this PR should only be to apply the changed formatting rules to the
repo, and from skimming the results, this seems to be the case.
My work can be checked by applying the short, manual commits, and then
rerunning the command listed in the autogenerated commits (those whose
messages I have prefixed auto:) and seeing if your results agree.
It might be that the other diffs should be fixed at some point but I'm
leaving that aside for now.
fd '\.c(c|pp)?$' --print0| xargs -0 clang-format -i
2024-04-25 17:38:00 +00:00
|
|
|
if ((x = KCPUIDS(16H, EAX) & 0x7fff))
|
|
|
|
decimal("frequency", x, "mhz");
|
|
|
|
if ((x = KCPUIDS(16H, EBX) & 0x7fff))
|
|
|
|
decimal("turbo", x, "mhz");
|
|
|
|
if ((x = KCPUIDS(16H, ECX) & 0x7fff))
|
|
|
|
decimal("bus", x, "mhz");
|
2021-08-13 18:18:25 +00:00
|
|
|
}
|
|
|
|
|
2020-06-15 14:18:57 +00:00
|
|
|
if (X86_HAVE(HYPERVISOR)) {
|
2022-05-19 07:34:15 +00:00
|
|
|
int ax, cx;
|
|
|
|
char s[4 * 3 + 1];
|
|
|
|
asm("push\t%%rbx\r\n"
|
|
|
|
"cpuid\r\n"
|
|
|
|
"mov\t%%ebx,0+%2\r\n"
|
|
|
|
"mov\t%%ecx,4+%2\r\n"
|
|
|
|
"mov\t%%edx,8+%2\r\n"
|
|
|
|
"movb\t$0,12+%2\r\n"
|
2020-06-15 14:18:57 +00:00
|
|
|
"pop\t%%rbx"
|
2022-05-19 07:34:15 +00:00
|
|
|
: "=a"(ax), "=c"(cx), "=o"(s)
|
|
|
|
: "0"(0x40000000), "1"(0)
|
|
|
|
: "rdx");
|
|
|
|
kprintf("Running inside %s (eax=%#x)\n", s, ax);
|
2020-06-15 14:18:57 +00:00
|
|
|
}
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
printf("\n");
|
|
|
|
SHOW(kX86CpuFamily);
|
|
|
|
SHOW(kX86CpuModel);
|
2020-06-15 14:18:57 +00:00
|
|
|
printf("\n");
|
|
|
|
SHOW(kX86CpuStepping);
|
|
|
|
SHOW(kX86CpuType);
|
2021-06-24 19:31:26 +00:00
|
|
|
SHOW(kX86CpuModelid);
|
2020-06-15 14:18:57 +00:00
|
|
|
SHOW(kX86CpuExtmodelid);
|
2021-06-24 19:31:26 +00:00
|
|
|
SHOW(kX86CpuFamilyid);
|
2020-06-15 14:18:57 +00:00
|
|
|
SHOW(kX86CpuExtfamilyid);
|
|
|
|
|
|
|
|
printf("\n");
|
|
|
|
tsc_aux = rdpid();
|
|
|
|
show("TSC_AUX", tsc_aux);
|
|
|
|
show(" → core", TSC_AUX_CORE(tsc_aux));
|
|
|
|
show(" → node", TSC_AUX_NODE(tsc_aux));
|
|
|
|
|
|
|
|
printf("\n");
|
|
|
|
printf("Caches\n");
|
|
|
|
printf("──────\n");
|
2024-07-04 09:45:45 +00:00
|
|
|
showcachesizes_intel();
|
|
|
|
showcachesizes_amd();
|
2020-06-15 14:18:57 +00:00
|
|
|
|
|
|
|
printf("\n");
|
|
|
|
printf("Features\n");
|
|
|
|
printf("────────\n");
|
|
|
|
CANIUSE(ACC);
|
|
|
|
CANIUSE(ACPI);
|
|
|
|
CANIUSE(ADX);
|
|
|
|
CANIUSE(AES);
|
|
|
|
CANIUSE(APIC);
|
|
|
|
CANIUSE(ARCH_CAPABILITIES);
|
|
|
|
CANIUSE(AVX);
|
|
|
|
|
|
|
|
printf("%-20s%s%s%s%s\n", "AVX2", X86_HAVE(AVX2) ? GREEN : RED,
|
|
|
|
X86_HAVE(AVX2) ? "present" : "unavailable", RESET,
|
|
|
|
(!X86_HAVE(AVX2) && ({
|
|
|
|
unsigned eax, ebx, ecx, edx;
|
2024-07-04 09:45:45 +00:00
|
|
|
cpuid(7, 0, &eax, &ebx, &ecx, &edx);
|
2020-06-15 14:18:57 +00:00
|
|
|
!!(ebx & (1u << 5));
|
|
|
|
}))
|
|
|
|
? " (disabled by operating system)"
|
|
|
|
: "");
|
|
|
|
|
2023-11-10 23:41:55 +00:00
|
|
|
CANIUSE(AVXVNNI);
|
2024-01-29 23:45:10 +00:00
|
|
|
CANIUSE(AVXVNNIINT8);
|
|
|
|
CANIUSE(AVXVNNIINT16);
|
2020-06-15 14:18:57 +00:00
|
|
|
CANIUSE(AVX512BW);
|
|
|
|
CANIUSE(AVX512CD);
|
|
|
|
CANIUSE(AVX512DQ);
|
|
|
|
CANIUSE(AVX512ER);
|
|
|
|
CANIUSE(AVX512F);
|
|
|
|
CANIUSE(AVX512IFMA);
|
|
|
|
CANIUSE(AVX512PF);
|
|
|
|
CANIUSE(AVX512VBMI);
|
|
|
|
CANIUSE(AVX512VL);
|
|
|
|
CANIUSE(AVX512_4FMAPS);
|
|
|
|
CANIUSE(AVX512_4VNNIW);
|
2024-03-24 10:14:25 +00:00
|
|
|
CANIUSE(AVX512_FP16);
|
2020-06-15 14:18:57 +00:00
|
|
|
CANIUSE(AVX512_BF16);
|
|
|
|
CANIUSE(AVX512_BITALG);
|
|
|
|
CANIUSE(AVX512_VBMI2);
|
|
|
|
CANIUSE(AVX512_VNNI);
|
|
|
|
CANIUSE(AVX512_VP2INTERSECT);
|
|
|
|
CANIUSE(AVX512_VPOPCNTDQ);
|
|
|
|
CANIUSE(BMI);
|
|
|
|
CANIUSE(BMI2);
|
|
|
|
CANIUSE(CID);
|
|
|
|
CANIUSE(CLDEMOTE);
|
|
|
|
CANIUSE(CLFLUSH);
|
|
|
|
CANIUSE(CLFLUSHOPT);
|
|
|
|
CANIUSE(CLWB);
|
|
|
|
CANIUSE(CMOV);
|
|
|
|
CANIUSE(CQM);
|
|
|
|
CANIUSE(CX16);
|
|
|
|
CANIUSE(CX8);
|
|
|
|
CANIUSE(DCA);
|
|
|
|
CANIUSE(DE);
|
|
|
|
CANIUSE(DS);
|
|
|
|
CANIUSE(DSCPL);
|
|
|
|
CANIUSE(DTES64);
|
|
|
|
CANIUSE(ERMS);
|
|
|
|
CANIUSE(EST);
|
|
|
|
CANIUSE(F16C);
|
|
|
|
CANIUSE(FDP_EXCPTN_ONLY);
|
|
|
|
CANIUSE(FLUSH_L1D);
|
|
|
|
CANIUSE(FMA);
|
|
|
|
CANIUSE(FPU);
|
|
|
|
CANIUSE(FSGSBASE);
|
|
|
|
CANIUSE(FXSR);
|
|
|
|
CANIUSE(GBPAGES);
|
|
|
|
CANIUSE(GFNI);
|
|
|
|
CANIUSE(HLE);
|
|
|
|
CANIUSE(HT);
|
|
|
|
CANIUSE(HYPERVISOR);
|
|
|
|
CANIUSE(IA64);
|
|
|
|
CANIUSE(INTEL_PT);
|
|
|
|
CANIUSE(INTEL_STIBP);
|
|
|
|
CANIUSE(INVPCID);
|
|
|
|
CANIUSE(LA57);
|
|
|
|
CANIUSE(LM);
|
|
|
|
CANIUSE(MCA);
|
|
|
|
CANIUSE(MCE);
|
|
|
|
CANIUSE(MD_CLEAR);
|
|
|
|
CANIUSE(MMX);
|
|
|
|
CANIUSE(MOVBE);
|
|
|
|
CANIUSE(MOVDIR64B);
|
|
|
|
CANIUSE(MOVDIRI);
|
|
|
|
CANIUSE(MP);
|
|
|
|
CANIUSE(MPX);
|
|
|
|
CANIUSE(MSR);
|
|
|
|
CANIUSE(MTRR);
|
|
|
|
CANIUSE(MWAIT);
|
|
|
|
CANIUSE(NX);
|
|
|
|
CANIUSE(OSPKE);
|
|
|
|
CANIUSE(OSXSAVE);
|
|
|
|
CANIUSE(PAE);
|
|
|
|
CANIUSE(PAT);
|
|
|
|
CANIUSE(PBE);
|
|
|
|
CANIUSE(PCID);
|
|
|
|
CANIUSE(PCLMUL);
|
|
|
|
CANIUSE(PCONFIG);
|
|
|
|
CANIUSE(PDCM);
|
|
|
|
CANIUSE(PGE);
|
|
|
|
CANIUSE(PKU);
|
|
|
|
CANIUSE(PN);
|
|
|
|
CANIUSE(POPCNT);
|
|
|
|
CANIUSE(PSE);
|
|
|
|
CANIUSE(PSE36);
|
|
|
|
CANIUSE(RDPID);
|
|
|
|
CANIUSE(RDRND);
|
|
|
|
CANIUSE(RDSEED);
|
|
|
|
CANIUSE(RDTSCP);
|
|
|
|
CANIUSE(RDT_A);
|
|
|
|
CANIUSE(RTM);
|
|
|
|
CANIUSE(SDBG);
|
|
|
|
CANIUSE(SELFSNOOP);
|
|
|
|
CANIUSE(SEP);
|
|
|
|
CANIUSE(SHA);
|
|
|
|
CANIUSE(SMAP);
|
|
|
|
CANIUSE(SMEP);
|
|
|
|
CANIUSE(SMX);
|
|
|
|
CANIUSE(SPEC_CTRL);
|
|
|
|
CANIUSE(SPEC_CTRL_SSBD);
|
|
|
|
CANIUSE(SSE);
|
|
|
|
CANIUSE(SSE2);
|
|
|
|
CANIUSE(SSE3);
|
|
|
|
CANIUSE(SSE4_1);
|
|
|
|
CANIUSE(SSE4_2);
|
|
|
|
CANIUSE(SSSE3);
|
|
|
|
CANIUSE(SYSCALL);
|
|
|
|
CANIUSE(TM2);
|
|
|
|
CANIUSE(TME);
|
|
|
|
CANIUSE(TSC);
|
2024-07-04 17:52:16 +00:00
|
|
|
CANIUSE(INVTSC);
|
2020-06-15 14:18:57 +00:00
|
|
|
CANIUSE(TSC_ADJUST);
|
|
|
|
CANIUSE(TSC_DEADLINE_TIMER);
|
|
|
|
CANIUSE(TSX_FORCE_ABORT);
|
|
|
|
CANIUSE(UMIP);
|
|
|
|
CANIUSE(VAES);
|
|
|
|
CANIUSE(VME);
|
|
|
|
CANIUSE(VMX);
|
|
|
|
CANIUSE(VPCLMULQDQ);
|
|
|
|
CANIUSE(WAITPKG);
|
|
|
|
CANIUSE(X2APIC);
|
|
|
|
CANIUSE(XSAVE);
|
|
|
|
CANIUSE(XTPR);
|
|
|
|
CANIUSE(ZERO_FCS_FDS);
|
|
|
|
|
|
|
|
printf("\n");
|
|
|
|
printf("AMD Stuff\n");
|
|
|
|
printf("─────────\n");
|
|
|
|
CANIUSE(3DNOW);
|
|
|
|
CANIUSE(3DNOWEXT);
|
|
|
|
CANIUSE(3DNOWPREFETCH);
|
|
|
|
CANIUSE(ABM);
|
|
|
|
CANIUSE(BPEXT);
|
|
|
|
CANIUSE(CMP_LEGACY);
|
|
|
|
CANIUSE(CR8_LEGACY);
|
|
|
|
CANIUSE(EXTAPIC);
|
|
|
|
CANIUSE(FMA4);
|
|
|
|
CANIUSE(FXSR_OPT);
|
|
|
|
CANIUSE(IBS);
|
|
|
|
CANIUSE(LAHF_LM);
|
|
|
|
CANIUSE(LWP);
|
|
|
|
CANIUSE(MISALIGNSSE);
|
|
|
|
CANIUSE(MMXEXT);
|
|
|
|
CANIUSE(MWAITX);
|
|
|
|
CANIUSE(NODEID_MSR);
|
|
|
|
CANIUSE(OSVW);
|
|
|
|
CANIUSE(OVERFLOW_RECOV);
|
|
|
|
CANIUSE(PERFCTR_CORE);
|
|
|
|
CANIUSE(PERFCTR_LLC);
|
|
|
|
CANIUSE(PERFCTR_NB);
|
|
|
|
CANIUSE(PTSC);
|
|
|
|
CANIUSE(SKINIT);
|
|
|
|
CANIUSE(SMCA);
|
|
|
|
CANIUSE(SSE4A);
|
|
|
|
CANIUSE(SUCCOR);
|
|
|
|
CANIUSE(SVM);
|
|
|
|
CANIUSE(TBM);
|
|
|
|
CANIUSE(TCE);
|
|
|
|
CANIUSE(TOPOEXT);
|
|
|
|
CANIUSE(WDT);
|
|
|
|
CANIUSE(XOP);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2023-05-14 16:32:15 +00:00
|
|
|
|
2023-08-13 08:44:39 +00:00
|
|
|
#else
|
|
|
|
|
|
|
|
int main(int argc, char *argv[]) {
|
|
|
|
}
|
|
|
|
|
2023-05-14 16:32:15 +00:00
|
|
|
#endif /* __x86_64__ */
|