aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2017-09-03 23:13:35 +0200
committerUros Bizjak <uros@gcc.gnu.org>2017-09-03 23:13:35 +0200
commitf36b315d1070bfaddbfcf9ee1cb08dc192aaf1c3 (patch)
treead28d36dc723454d22712966e9eec47510180581 /gcc
parent22140cb0d746d5d7a18f11f864baa53a95c15bdc (diff)
downloadgcc-f36b315d1070bfaddbfcf9ee1cb08dc192aaf1c3.zip
gcc-f36b315d1070bfaddbfcf9ee1cb08dc192aaf1c3.tar.gz
gcc-f36b315d1070bfaddbfcf9ee1cb08dc192aaf1c3.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog12
-rw-r--r--gcc/testsuite/gcc.target/i386/mpx/mpx-check.h6
-rw-r--r--gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-lbv.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-nov.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-ubv.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-lbv.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-nov.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-ubv.c2
8 files changed, 20 insertions, 10 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4ead57e..18e7739 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,15 @@
+2017-09-03 Uros Bizjak <ubizjak@gmail.com>
+
+ * 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 <jakub@redhat.com>
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 73aa01f..dd90fbd 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 5aa6007..bbbb256 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 55c65d9..4beda02 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 11b498e..4b76384 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 9f1941d..dab1dc8 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 903afbc..6bf4721 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 f5d842a..4af5975 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];