SPU: add some AVX-512 variants

This commit is contained in:
Nekotekina 2017-12-16 03:19:21 +03:00
parent 4aee4ed6d7
commit 6d34dcd75f
5 changed files with 229 additions and 41 deletions

View file

@ -8,11 +8,11 @@ namespace utils
inline std::array<u32, 4> get_cpuid(u32 func, u32 subfunc)
{
int regs[4];
#ifdef _MSC_VER
#ifdef _MSC_VER
__cpuidex(regs, func, subfunc);
#else
#else
__asm__ volatile("cpuid" : "=a" (regs[0]), "=b" (regs[1]), "=c" (regs[2]), "=d" (regs[3]) : "a" (func), "c" (subfunc));
#endif
#endif
return {0u+regs[0], 0u+regs[1], 0u+regs[2], 0u+regs[3]};
}
@ -20,8 +20,12 @@ namespace utils
bool has_avx();
bool has_avx2();
bool has_rtm();
bool has_512();
inline bool transaction_enter()
{
while (true)