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 (rs6000): Do not save/restore user-defined global registers


Dale Johannesen <dalej@apple.com> writes:

> /* { dg-do run { target powerpc*-*-* } } */

You committed this as gcc.c-torture/execute/20050603-1.c - but this
does not work.  dg-do is not available for the gcc.c-torture tests.

Btw the same applies to gcc.c-torture/execute/20050603-2.c.

Please either move the tests to gcc.dg or change them so that they
will work correctly (using a .x file).  Currently the first test fails
on all platforms since the test uses a PowerPC specific register and
is run on all platforms.

One further note: Your emails do not give a ChangeLog for these tests,
please add them next time,

Andreas

> #include <locale.h>
> #include <stdlib.h>
> register int *testreg asm ("r29");
>
> int x;
> int y;
> int *ext_func (int *p) { return p; }
>
> void test_reg_save_restore (int*) __attribute__((noinline));
> void
> test_reg_save_restore (int *p)
> {
>     setlocale (LC_ALL, "C");
>     testreg = ext_func(p);
> }
> main() {
>   testreg = &x;
>   test_reg_save_restore (&y);
>   if (testreg != &y)
>     abort ();
>   return 0;
> }
>

Andreas
-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Attachment: pgp00000.pgp
Description: PGP signature


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