MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / xgetbv

Function xgetbv

src/OpenColorIO/CPUInfo.cpp:36–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34};
35
36static inline int64_t xgetbv()
37{
38 int index = 0;
39#if _MSC_VER
40 return _xgetbv(index);
41#else
42 int eax = 0;
43 int edx = 0;
44 __asm__ volatile (".byte 0x0f, 0x01, 0xd0" : "=a"(eax), "=d"(edx) : "c" (index));
45 return (int64_t)edx << 32 | (int64_t)eax;
46#endif
47}
48
49static inline void cpuid(int index, int *data)
50{

Callers 1

CPUInfoMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected