This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] -mno-smartmips testcases


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]