* [gentoo-project] Looking for someone with AVX-512 capable CPU
@ 2019-05-27 16:25 99% Michał Górny
0 siblings, 0 replies; 1+ results
From: Michał Górny @ 2019-05-27 16:25 UTC (permalink / raw
To: gentoo-project
[-- Attachment #1: Type: text/plain, Size: 1401 bytes --]
Hi,
I'm looking for someone having AVX-512 capable CPU, for the purpose of
XSAVE support development in LLDB. If you have such a CPU, could you
compile and run the following program, and send me the output? If you
could in the future provide me with a shell account (unprivileged user
is sufficient) to build and test LLDB, that'd be even better.
The program is meant to grab offsets and sizes of XSAVE components. It
should run unprivileged. However, it might require a new-ish kernel.
TIA.
---
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
#include <cpuid.h>
int main()
{
int i;
uint32_t eax, ebx, ecx, edx;
uint64_t xcr0;
asm volatile(
"xorq %%rcx, %%rcx\n\t"
"xgetbv\n\t"
: "=a"(eax), "=d"(edx)
:
:
);
printf("XCR0: EAX = %08" PRIx32 "; EDX = %08" PRIx32 "\n", eax, edx);
xcr0 = ((uint64_t)edx << 32) | eax;
if (!__get_cpuid_count(0x0D, 0, &eax, &ebx, &ecx, &edx))
return 0;
printf("0Dh(0): EAX = %08" PRIx32 "; EDX = %08" PRIx32 "\n", eax, edx);
printf("0Dh(0): ECX = %" PRId32 "; EBX = %" PRId32 "\n", ecx, ebx);
for (i = 2; i < 64; ++i)
{
if (!(xcr0 & ((uint64_t)1 << i)))
continue;
__cpuid_count(0x0D, i, eax, ebx, ecx, edx);
printf("0Dh(%d): EAX = %" PRId32 "; EBX = %" PRId32 "; ECX = %"
PRIx32 "\n", i, eax, ebx, ecx);
}
}
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 618 bytes --]
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-05-27 16:25 99% [gentoo-project] Looking for someone with AVX-512 capable CPU Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox