mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-25 18:07:31 +09:00
Finally finish with MinGW building (linking still has some issues shush)
This commit is contained in:
parent
ad07988f5b
commit
854f39b4ab
32 changed files with 104 additions and 19 deletions
|
|
@ -13,7 +13,15 @@
|
|||
#include <intrin.h>
|
||||
static void cpuid (uint32_t abcd[4]) { __cpuid ((int*)abcd, 1); }
|
||||
static void cpuid7(uint32_t abcd[4]) { __cpuidex((int*)abcd, 7, 0); }
|
||||
static uint64_t xgetbv(uint32_t xcr) { return _xgetbv(xcr); }
|
||||
static uint64_t xgetbv(uint32_t xcr) {
|
||||
#if defined(__MINGW32__)
|
||||
uint32_t eax, edx;
|
||||
__asm__ __volatile__ ("xgetbv" : "=a"(eax), "=d"(edx) : "c"(xcr));
|
||||
return (uint64_t)(edx) << 32 | eax;
|
||||
#else
|
||||
return _xgetbv(xcr);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#include <cpuid.h>
|
||||
#if !defined(__cpuid_count) // Old Mac Clang doesn't have this defined.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue