This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] -mno-smartmips testcases
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Catherine Moore <clm at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 10 Nov 2008 20:35:53 +0000
- Subject: Re: [patch] -mno-smartmips testcases
- References: <491758E5.9070204@codesourcery.com>
Catherine Moore <clm@codesourcery.com> writes:
> Hi Richard, I originally posted these testcases as part of another
> patch and this piece still needs to be approved. Does this look okay
> to install? Thanks, Catherine
>
> gcc testsuite ChangeLog:
>
> 2008-10-22 Catherine Moore <clm@codesourcery.com>
>
> * gcc.target/mips/no-smartmips-lwxs.c: New test.
> * gcc.target/mips/no-smartmips-ror-1.c: New test.
>
>
> Index: testsuite/gcc.target/mips/no-smartmips-lwxs.c
> ===================================================================
> --- testsuite/gcc.target/mips/no-smartmips-lwxs.c (revision 0)
> +++ testsuite/gcc.target/mips/no-smartmips-lwxs.c (revision 0)
> @@ -0,0 +1,8 @@
> +/* { dg-do compile } */
> +/* { dg-mips-options "-O -mno-smartmips" } */
> +
> +NOMIPS16 int scaled_indexed_word_load (int a[], int b)
> +{
> + return a[b];
> +}
> +/* { dg-final { scan-assembler-not "\tlwxs\t" } } */
> Index: testsuite/gcc.target/mips/no-smartmips-ror-1.c
> ===================================================================
> --- testsuite/gcc.target/mips/no-smartmips-ror-1.c (revision 0)
> +++ testsuite/gcc.target/mips/no-smartmips-ror-1.c (revision 0)
> @@ -0,0 +1,8 @@
> +/* { dg-do compile } */
> +/* { dg-mips-options "-O -mno-smartmips" } */
> +
> +NOMIPS16 int rotate_left (unsigned a, unsigned s)
> +{
> + return (a << s) | (a >> (32 - s));
> +}
> +/* { dg-final { scan-assembler-not "\tror\t" } } */
The last test should have something like -march=mips32r2 as well,
because some processors have ROR as a processor-specific extension.
E.g. the current test would (or at least should) fail when run with
-march=vr5500.
OK with that change, thanks.
Richard