Patch (rs6000): Do not save/restore user-defined global registers

Andreas Jaeger aj@suse.de
Sun Jun 5 09:26:00 GMT 2005


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050605/0dd85d8d/attachment.sig>


More information about the Gcc-patches mailing list