diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0300-config-sparc-sparc.c-eligible_for_return_delay-Do-no.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0300-config-sparc-sparc.c-eligible_for_return_delay-Do-no.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0300-config-sparc-sparc.c-eligible_for_return_delay-Do-no.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0300-config-sparc-sparc.c-eligible_for_return_delay-Do-no.patch new file mode 100644 index 0000000000..7052918b56 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0300-config-sparc-sparc.c-eligible_for_return_delay-Do-no.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | From 569fa107c89c3adc1fcf7286079c7aff088159ef Mon Sep 17 00:00:00 2001 | ||
2 | From: ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Sat, 21 May 2011 22:03:27 +0000 | ||
4 | Subject: [PATCH] * config/sparc/sparc.c (eligible_for_return_delay): Do not return | ||
5 | false if there are call-saved registers here... | ||
6 | (sparc_can_use_return_insn_p): ...but here instead. | ||
7 | (save_or_restore_regs): Fix thinko. | ||
8 | (sparc_expand_prologue): Use current_function_is_leaf. | ||
9 | (sparc_frame_pointer_required): Likewise. | ||
10 | |||
11 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@174009 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
12 | |||
13 | index 0f137e8..8ad374a 100644 | ||
14 | --- a/gcc/config/sparc/sparc.c | ||
15 | +++ b/gcc/config/sparc/sparc.c | ||
16 | @@ -2845,11 +2845,6 @@ eligible_for_return_delay (rtx trial) | ||
17 | if (get_attr_length (trial) != 1) | ||
18 | return 0; | ||
19 | |||
20 | - /* If there are any call-saved registers, we should scan TRIAL if it | ||
21 | - does not reference them. For now just make it easy. */ | ||
22 | - if (num_gfregs) | ||
23 | - return 0; | ||
24 | - | ||
25 | /* If the function uses __builtin_eh_return, the eh_return machinery | ||
26 | occupies the delay slot. */ | ||
27 | if (crtl->calls_eh_return) | ||
28 | @@ -4421,7 +4416,7 @@ save_or_restore_regs (int low, int high, rtx base, int offset, int action) | ||
29 | emit_move_insn (gen_rtx_REG (mode, regno), mem); | ||
30 | |||
31 | /* Always preserve double-word alignment. */ | ||
32 | - offset = (offset + 7) & -8; | ||
33 | + offset = (offset + 8) & -8; | ||
34 | } | ||
35 | } | ||
36 | |||
37 | @@ -4528,7 +4523,7 @@ sparc_expand_prologue (void) | ||
38 | example, the regrename pass has special provisions to not rename to | ||
39 | non-leaf registers in a leaf function. */ | ||
40 | sparc_leaf_function_p | ||
41 | - = optimize > 0 && leaf_function_p () && only_leaf_regs_used (); | ||
42 | + = optimize > 0 && current_function_is_leaf && only_leaf_regs_used (); | ||
43 | |||
44 | /* Need to use actual_fsize, since we are also allocating | ||
45 | space for our callee (and our own register save area). */ | ||
46 | @@ -4658,6 +4653,7 @@ bool | ||
47 | sparc_can_use_return_insn_p (void) | ||
48 | { | ||
49 | return sparc_prologue_data_valid_p | ||
50 | + && num_gfregs == 0 | ||
51 | && (actual_fsize == 0 || !sparc_leaf_function_p); | ||
52 | } | ||
53 | |||
54 | @@ -9680,7 +9676,7 @@ sparc_expand_compare_and_swap_12 (rtx result, rtx mem, rtx oldval, rtx newval) | ||
55 | bool | ||
56 | sparc_frame_pointer_required (void) | ||
57 | { | ||
58 | - return !(leaf_function_p () && only_leaf_regs_used ()); | ||
59 | + return !(current_function_is_leaf && only_leaf_regs_used ()); | ||
60 | } | ||
61 | |||
62 | /* The way this is structured, we can't eliminate SFP in favor of SP | ||
63 | -- | ||
64 | 1.7.0.4 | ||
65 | |||