From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-project <gentoo-project@lists.gentoo.org>
Subject: [gentoo-project] Looking for someone with AVX-512 capable CPU
Date: Mon, 27 May 2019 18:25:53 +0200 [thread overview]
Message-ID: <c80385105d4596cfce157b962f903197c95c8444.camel@gentoo.org> (raw)
[-- 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 --]
next reply other threads:[~2019-05-27 16:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-27 16:25 Michał Górny [this message]
2019-05-27 17:05 ` [gentoo-project] Looking for someone with AVX-512 capable CPU Thomas Deutschmann
2019-05-27 20:21 ` Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c80385105d4596cfce157b962f903197c95c8444.camel@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-project@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox