diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.5.1/fedora/gcc43-ppc32-retaddr.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.5.1/fedora/gcc43-ppc32-retaddr.patch | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/fedora/gcc43-ppc32-retaddr.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/fedora/gcc43-ppc32-retaddr.patch deleted file mode 100644 index cf9f856de5..0000000000 --- a/meta/recipes-devtools/gcc/gcc-4.5.1/fedora/gcc43-ppc32-retaddr.patch +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | Upstream-Status: Inappropriate [distribution: fedora] | ||
2 | 2005-11-28 Jakub Jelinek <jakub@redhat.com> | ||
3 | |||
4 | * config/rs6000/rs6000.c (rs6000_return_addr): If COUNT == 0, | ||
5 | read word RETURN_ADDRESS_OFFSET bytes above arg_pointer_rtx | ||
6 | instead of doing an extran indirection from frame_pointer_rtx. | ||
7 | |||
8 | * gcc.dg/20051128-1.c: New test. | ||
9 | |||
10 | Index: gcc/config/rs6000/rs6000.c | ||
11 | =================================================================== | ||
12 | --- gcc/config/rs6000/rs6000.c.orig 2010-03-27 03:27:39.000000000 -0700 | ||
13 | +++ gcc/config/rs6000/rs6000.c 2010-06-25 10:18:04.053381930 -0700 | ||
14 | @@ -17646,17 +17646,22 @@ | ||
15 | don't try to be too clever here. */ | ||
16 | if (count != 0 || (DEFAULT_ABI != ABI_AIX && flag_pic)) | ||
17 | { | ||
18 | + rtx x; | ||
19 | cfun->machine->ra_needs_full_frame = 1; | ||
20 | |||
21 | - return | ||
22 | - gen_rtx_MEM | ||
23 | - (Pmode, | ||
24 | - memory_address | ||
25 | - (Pmode, | ||
26 | - plus_constant (copy_to_reg | ||
27 | - (gen_rtx_MEM (Pmode, | ||
28 | - memory_address (Pmode, frame))), | ||
29 | - RETURN_ADDRESS_OFFSET))); | ||
30 | + if (count == 0) | ||
31 | + { | ||
32 | + gcc_assert (frame == frame_pointer_rtx); | ||
33 | + x = arg_pointer_rtx; | ||
34 | + } | ||
35 | + else | ||
36 | + { | ||
37 | + x = memory_address (Pmode, frame); | ||
38 | + x = copy_to_reg (gen_rtx_MEM (Pmode, x)); | ||
39 | + } | ||
40 | + | ||
41 | + x = plus_constant (x, RETURN_ADDRESS_OFFSET); | ||
42 | + return gen_rtx_MEM (Pmode, memory_address (Pmode, x)); | ||
43 | } | ||
44 | |||
45 | cfun->machine->ra_need_lr = 1; | ||
46 | Index: gcc/testsuite/gcc.dg/20051128-1.c | ||
47 | =================================================================== | ||
48 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
49 | +++ gcc/testsuite/gcc.dg/20051128-1.c 2010-06-25 10:18:04.061382856 -0700 | ||
50 | @@ -0,0 +1,41 @@ | ||
51 | +/* { dg-do run } */ | ||
52 | +/* { dg-options "-O2 -fpic" } */ | ||
53 | + | ||
54 | +extern void exit (int); | ||
55 | +extern void abort (void); | ||
56 | + | ||
57 | +int b; | ||
58 | + | ||
59 | +struct A | ||
60 | +{ | ||
61 | + void *pad[147]; | ||
62 | + void *ra, *h; | ||
63 | + long o; | ||
64 | +}; | ||
65 | + | ||
66 | +void | ||
67 | +__attribute__((noinline)) | ||
68 | +foo (struct A *a, void *x) | ||
69 | +{ | ||
70 | + __builtin_memset (a, 0, sizeof (a)); | ||
71 | + if (!b) | ||
72 | + exit (0); | ||
73 | +} | ||
74 | + | ||
75 | +void | ||
76 | +__attribute__((noinline)) | ||
77 | +bar (void) | ||
78 | +{ | ||
79 | + struct A a; | ||
80 | + | ||
81 | + __builtin_unwind_init (); | ||
82 | + foo (&a, __builtin_return_address (0)); | ||
83 | +} | ||
84 | + | ||
85 | +int | ||
86 | +main (void) | ||
87 | +{ | ||
88 | + bar (); | ||
89 | + abort (); | ||
90 | + return 0; | ||
91 | +} | ||