OSDN Git Service

2008-03-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / powerpc / darwin-ehreturn-1.c
1 /* { dg-do compile { target powerpc*-*-darwin* } } */
2 /* { dg-require-effective-target ilp32 } */
3 /* { dg-options "-mcpu=G3 -funwind-tables" } */
4 /* { dg-final { scan-assembler "bl save_world" } } */
5 /* { dg-final { scan-assembler ".byte\t0x6b" } } */
6
7 /* Verify that on Darwin, even with -mcpu=G3, __builtin_eh_return
8    saves Altivec registers using save_world, and reports their
9    location in its EH information.  */
10
11 long offset;
12 void *handler;
13
14 extern void setup_offset(void);
15
16 void foo(void)
17 {
18   __builtin_unwind_init ();
19   setup_offset();
20   __builtin_eh_return (offset, handler);
21 }