]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
accelerated: x86-common: do not use _xgetbv() with clang
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Tue, 6 Feb 2018 13:40:59 +0000 (14:40 +0100)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Tue, 6 Feb 2018 13:40:59 +0000 (14:40 +0100)
Resolves #372

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
lib/accelerated/x86/x86-common.c

index 353a252909391d425e124aae4659092c85b3d73d..152b0355c3205e4ca2097a41ac10aebd6da3f263 100644 (file)
@@ -99,7 +99,7 @@ static unsigned check_4th_gen_intel_features(unsigned ecx)
        if ((ecx & OSXSAVE_MASK) != OSXSAVE_MASK)
                return 0;
 
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && !defined(__clang__)
        xcr0 = _xgetbv(0);
 #else
        __asm__ ("xgetbv" : "=a" (xcr0) : "c" (0) : "%edx");