On Wed, Mar 24, 2021 at 7:56 AM Alexandre Oliva <ol...@adacore.com> wrote:
>
>
> The gcc.target/i386 test sse2-mmx-maskmovq.c requires the mmap
> feature, but that's not enough for the test to be able to call
> sysconf.
>
> I've combined the target triplets used in other sysconf-calling tests,
> omitting non-x86 ones, with the preexisting mmap requirement in this
> test.

There are several other tests in gcc.target/i386 directory that call sysconf:

pr95443-1.c:  size_t page_size = 2 * sysconf(_SC_PAGESIZE);
pr95443-2.c:  size_t page_size = 2 * sysconf(_SC_PAGESIZE);
sse2-mmx-maskmovq.c:  size_t page_size = sysconf(_SC_PAGESIZE);
strncmp-1.c:  size_t page_size = sysconf(_SC_PAGESIZE);

and they all have only:

/* { dg-do run { target mmap } } */

without any other target selectors.

Do these functions also fail, or is sse2-mmx-maskmovq.c special in some way?

Uros.

> Regstrapped on x86_64-linux-gnu and cross-tested for x86_64-vx7r2 along
> with other patches, mostly for the testsuite.  Ok to install?
>
>
> for  gcc/testsuite/ChangeLog
>
>         * gcc.target/i386/sse2-mmx-maskmovq.c: Require
>         sysconf-supporting x86 target triplets.
> ---
>  gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c 
> b/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c
> index 037f665f1178a..ad4bbf7c76451 100644
> --- a/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c
> +++ b/gcc/testsuite/gcc.target/i386/sse2-mmx-maskmovq.c
> @@ -1,4 +1,4 @@
> -/* { dg-do run { target mmap } } */
> +/* { dg-do run { target { { *-*-linux* *-*-gnu* *-*-darwin[912]* 
> *-*-uclinux* } && mmap } } } */
>  /* { dg-options "-O2 -fno-strict-aliasing -msse2" } */
>  /* { dg-additional-options "-mno-mmx" { target { ! ia32 } } } */
>
>
> --
> Alexandre Oliva, happy hacker  https://FSFLA.org/blogs/lxo/
>    Free Software Activist         GNU Toolchain Engineer
>         Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

Reply via email to