From: Uros Bizjak Date: Sun, 3 Sep 2017 21:13:35 +0000 (+0200) Subject: mpx-check.h (main): Use __get_cpuid_count and return NORUNRES on failure. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f36b315d1070bfaddbfcf9ee1cb08dc192aaf1c3;p=gcc.git mpx-check.h (main): Use __get_cpuid_count and return NORUNRES on failure. * gcc.target/i386/mpx/mpx-check.h (main): Use __get_cpuid_count and return NORUNRES on failure. * gcc.target/i386/mpx/va-arg-pack-1-lbv.c (foo1): Use __builtin_va_arg_pack instead of __va_arg_pack. * gcc.target/i386/mpx/va-arg-pack-1-nov.c (foo1): Ditto. * gcc.target/i386/mpx/va-arg-pack-1-ubv.c (foo1): Ditto. * gcc.target/i386/mpx/va-arg-pack-2-lbv.c (foo1): Ditto. * gcc.target/i386/mpx/va-arg-pack-2-nov.c (foo1): Ditto. * gcc.target/i386/mpx/va-arg-pack-2-ubv.c (foo1): Ditto. From-SVN: r251627 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4ead57edfa2..18e7739b4a7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,15 @@ +2017-09-03 Uros Bizjak + + * gcc.target/i386/mpx/mpx-check.h (main): Use __get_cpuid_count + and return NORUNRES on failure. + * gcc.target/i386/mpx/va-arg-pack-1-lbv.c (foo1): Use + __builtin_va_arg_pack instead of __va_arg_pack. + * gcc.target/i386/mpx/va-arg-pack-1-nov.c (foo1): Ditto. + * gcc.target/i386/mpx/va-arg-pack-1-ubv.c (foo1): Ditto. + * gcc.target/i386/mpx/va-arg-pack-2-lbv.c (foo1): Ditto. + * gcc.target/i386/mpx/va-arg-pack-2-nov.c (foo1): Ditto. + * gcc.target/i386/mpx/va-arg-pack-2-ubv.c (foo1): Ditto. + 2017-09-01 Jakub Jelinek PR target/81766 diff --git a/gcc/testsuite/gcc.target/i386/mpx/mpx-check.h b/gcc/testsuite/gcc.target/i386/mpx/mpx-check.h index 73aa01f2565..dd90fbd275a 100644 --- a/gcc/testsuite/gcc.target/i386/mpx/mpx-check.h +++ b/gcc/testsuite/gcc.target/i386/mpx/mpx-check.h @@ -31,10 +31,8 @@ main (int argc, const char **argv) { unsigned int eax, ebx, ecx, edx; - if (__get_cpuid_max (0, NULL) < 7) - return 0; - - __cpuid_count (7, 0, eax, ebx, ecx, edx); + if (!__get_cpuid_count (7, 0, &eax, &ebx, &ecx, &edx)) + return NORUNRES; /* Run MPX test only if host has MPX support. */ if ((ebx & bit_MPX) && (xgetbv (0) & XSTATE_BNDREGS)) diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-lbv.c index 5aa60072df3..bbbb256ae30 100644 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-lbv.c +++ b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-lbv.c @@ -28,7 +28,7 @@ foo2 (int i1, int *p1, ...) static __attribute__((always_inline)) int foo1 (int *p1, ...) { - return foo2 (10, p1, __va_arg_pack ()); + return foo2 (10, p1, __builtin_va_arg_pack ()); } int prebuf[100]; diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-nov.c index 55c65d92bd9..4beda02b951 100644 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-nov.c +++ b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-nov.c @@ -25,7 +25,7 @@ foo2 (int i1, int *p1, ...) static __attribute__((always_inline)) int foo1 (int *p1, ...) { - return foo2 (10, p1, __va_arg_pack ()); + return foo2 (10, p1, __builtin_va_arg_pack ()); } int prebuf[100]; diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-ubv.c index 11b498eba47..4b763842755 100644 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-ubv.c +++ b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-ubv.c @@ -28,7 +28,7 @@ foo2 (int i1, int *p1, ...) static __attribute__((always_inline)) int foo1 (int *p1, ...) { - return foo2 (10, p1, __va_arg_pack ()); + return foo2 (10, p1, __builtin_va_arg_pack ()); } int prebuf[100]; diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-lbv.c index 9f1941d69f1..dab1dc86792 100644 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-lbv.c +++ b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-lbv.c @@ -30,7 +30,7 @@ foo2 (int i1, int *p1, ...) static __attribute__((always_inline)) int foo1 (int *p1, ...) { - return foo2 (10, p1, __va_arg_pack ()); + return foo2 (10, p1, __builtin_va_arg_pack ()); } int prebuf[100]; diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-nov.c index 903afbce292..6bf4721f75a 100644 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-nov.c +++ b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-nov.c @@ -27,7 +27,7 @@ foo2 (int i1, int *p1, ...) static __attribute__((always_inline)) int foo1 (int *p1, ...) { - return foo2 (10, p1, __va_arg_pack ()); + return foo2 (10, p1, __builtin_va_arg_pack ()); } int prebuf[100]; diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-ubv.c index f5d842abf0d..4af59758fb0 100644 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-ubv.c +++ b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-ubv.c @@ -30,7 +30,7 @@ foo2 (int i1, int *p1, ...) static __attribute__((always_inline)) int foo1 (int *p1, ...) { - return foo2 (10, p1, __va_arg_pack ()); + return foo2 (10, p1, __builtin_va_arg_pack ()); } int prebuf[100];