This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix mpx testcases (Re: [CHKP] Fix for PR79990)
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, Kirill Yukhin <kirill dot yukhin at gmail dot com>, Alexander Ivchenko <aivchenk at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 8 Jun 2017 23:02:38 +0300
- Subject: Re: [PATCH] Fix mpx testcases (Re: [CHKP] Fix for PR79990)
- Authentication-results: sourceware.org; auth=none
- References: <CACysShgnUuetyR-7wAqh6wusBz67k-iVu6VGHzEzVvRvS2QW8Q@mail.gmail.com> <CAMbmDYb79XYn1oqP1qjz=_JFrXd8q=DqtEwTv3RdwWyTjwg30Q@mail.gmail.com> <CACysShiZxAEf1OEHkNGZNxRWW+Wv99OXx-9VcNBQknnLEe6NAA@mail.gmail.com> <CAMbmDYYP-58HA9CXMW+XuP7TWsKEkbwjM=xLYN-jLMqqf0xcUg@mail.gmail.com> <CACysShiE3Orf93-gFzaO+BmbAmb3qhcQMB--ai5K1ULzGpxTBA@mail.gmail.com> <CAMbmDYZ+DDk-=hHzg-Qogawdee2R7XzGhEokbcXA5NhgiYs4ww@mail.gmail.com> <CACysShg_2=mMGaX-+CLwn5fXzZFKsgTF6Lcx2UfSPRaphm7zUg@mail.gmail.com> <CAMbmDYbkyvuT0m=AYWcDw0-KOsSGUfg2TFFCnx_BGqWDFYHnnA@mail.gmail.com> <CACysShggeodsjLKfm1vChGi6O+Fj3B5NFdNnamQAeB0TKE_h7A@mail.gmail.com> <CACysShjP413DAkJyTinxvty0-=XB+XbA9LOjAe=SctE6p=-AdA@mail.gmail.com> <20170608194545.GE2154@tucnak>
2017-06-08 22:45 GMT+03:00 Jakub Jelinek <jakub@redhat.com>:
> On Tue, May 09, 2017 at 03:29:40PM +0200, Alexander Ivchenko wrote:
>> 2017-05-09 Alexander Ivchenko <aivchenk@gmail.com>
>>
>> * gcc.target/i386/mpx/hard-reg-2-lbv.c: New test.
>> * gcc.target/i386/mpx/hard-reg-2-nov.c: New test.
>> * gcc.target/i386/mpx/hard-reg-2-ubv.c: New test.
>
> These tests fail for me on i686, without -msse2 there is no
> "xmm0" register one can use.
>
> The following patch fixes it, tested on x86_64-linux and i686-linux,
> ok for trunk?
OK. Thanks for the fix.
Ilya
>
> 2017-06-08 Jakub Jelinek <jakub@redhat.com>
>
> * gcc.target/i386/mpx/hard-reg-1-nov.c (mpx_test): Use "esp"
> instead of "rsp" for -m32.
> * gcc.target/i386/mpx/hard-reg-2-lbv.c: Require sse2_runtime effective
> target, add -msse2 to dg-options.
> * gcc.target/i386/mpx/hard-reg-2-nov.c: Likewise.
> * gcc.target/i386/mpx/hard-reg-2-ubv.c: Likewise.
>
> --- gcc/testsuite/gcc.target/i386/mpx/hard-reg-1-nov.c.jj 2015-03-10 16:56:41.000000000 +0100
> +++ gcc/testsuite/gcc.target/i386/mpx/hard-reg-1-nov.c 2017-06-08 21:37:00.357993146 +0200
> @@ -13,7 +13,11 @@ int rd (int *p, int i)
>
> int mpx_test (int argc, const char **argv)
> {
> +#ifdef __x86_64__
> register int *frame __asm__("rsp");
> +#else
> + register int *frame __asm__("esp");
> +#endif
> rd (frame, 1);
>
> return 0;
> --- gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-lbv.c.jj 2017-06-08 17:53:25.000000000 +0200
> +++ gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-lbv.c 2017-06-08 21:37:23.772718716 +0200
> @@ -1,6 +1,6 @@
> -/* { dg-do run } */
> +/* { dg-do run { target sse2_runtime } } */
> /* { dg-shouldfail "bounds violation" } */
> -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */
> +/* { dg-options "-fcheck-pointer-bounds -mmpx -msse2" } */
>
>
> #define SHOULDFAIL
> --- gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-nov.c.jj 2017-06-08 17:53:25.000000000 +0200
> +++ gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-nov.c 2017-06-08 21:37:35.517581062 +0200
> @@ -1,5 +1,5 @@
> -/* { dg-do run } */
> -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */
> +/* { dg-do run { target sse2_runtime } } */
> +/* { dg-options "-fcheck-pointer-bounds -mmpx -msse2" } */
>
> #include "mpx-check.h"
>
> --- gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-ubv.c.jj 2017-06-08 17:53:25.000000000 +0200
> +++ gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-ubv.c 2017-06-08 21:37:49.910412372 +0200
> @@ -1,6 +1,6 @@
> -/* { dg-do run } */
> +/* { dg-do run { target sse2_runtime } } */
> /* { dg-shouldfail "bounds violation" } */
> -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */
> +/* { dg-options "-fcheck-pointer-bounds -mmpx -msse2" } */
>
>
> #define SHOULDFAIL
>
>
> Jakub