aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@gcc.gnu.org>2007-09-12 03:46:53 +0000
committerKaz Kojima <kkojima@gcc.gnu.org>2007-09-12 03:46:53 +0000
commit6ac9cbc5e873546f17db896f8110367376f69c52 (patch)
tree291fd107026ba7e5e5a988abee75c0c0f6afb844
parent367985140f2647a348daa02872a3ddddfed26177 (diff)
downloadgcc-6ac9cbc5e873546f17db896f8110367376f69c52.zip
gcc-6ac9cbc5e873546f17db896f8110367376f69c52.tar.gz
gcc-6ac9cbc5e873546f17db896f8110367376f69c52.tar.bz2
sh.c (calc_live_regs): Use current_function_saves_all_registers instead of...
* config/sh/sh.c (calc_live_regs): Use current_function_saves_all_registers instead of current_function_has_nonlocal_label. (sh_allocate_initial_value): Likewise. (sh_get_pr_initial_val): Likewise. * config/sh/sh.h (SHMEDIA_REGS_STACK_ADJUST): Likewise. * config/sh/sh.md (load_ra): Likewise. From-SVN: r128408
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/sh/sh.c6
-rw-r--r--gcc/config/sh/sh.h2
-rw-r--r--gcc/config/sh/sh.md2
4 files changed, 15 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 125b6db..bd983fb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2007-09-12 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ * config/sh/sh.c (calc_live_regs): Use
+ current_function_saves_all_registers instead of
+ current_function_has_nonlocal_label.
+ (sh_allocate_initial_value): Likewise.
+ (sh_get_pr_initial_val): Likewise.
+ * config/sh/sh.h (SHMEDIA_REGS_STACK_ADJUST): Likewise.
+ * config/sh/sh.md (load_ra): Likewise.
+
2007-09-12 Hans-Peter Nilsson <hp@axis.com>
* config/cris/t-linux (LIMITS_H_TEST): Only define if not inhibit_libc.
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index ad9dd22..36cc9ff 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -5873,7 +5873,7 @@ calc_live_regs (HARD_REG_SET *live_regs_mask)
if (TARGET_SHCOMPACT
&& ((current_function_args_info.call_cookie
& ~ CALL_COOKIE_RET_TRAMP (1))
- || current_function_has_nonlocal_label))
+ || current_function_saves_all_registers))
pr_live = 1;
has_call = TARGET_SHMEDIA ? ! leaf_function_p () : pr_live;
for (count = 0, reg = FIRST_PSEUDO_REGISTER; reg-- != 0; )
@@ -8944,7 +8944,7 @@ sh_allocate_initial_value (rtx hard_reg)
&& ! (TARGET_SHCOMPACT
&& ((current_function_args_info.call_cookie
& ~ CALL_COOKIE_RET_TRAMP (1))
- || current_function_has_nonlocal_label)))
+ || current_function_saves_all_registers)))
x = hard_reg;
else
x = gen_frame_mem (Pmode, return_address_pointer_rtx);
@@ -10332,7 +10332,7 @@ sh_get_pr_initial_val (void)
if (TARGET_SHCOMPACT
&& ((current_function_args_info.call_cookie
& ~ CALL_COOKIE_RET_TRAMP (1))
- || current_function_has_nonlocal_label))
+ || current_function_saves_all_registers))
return gen_frame_mem (SImode, return_address_pointer_rtx);
/* If we haven't finished rtl generation, there might be a nonlocal label
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index 8f299b7..0583a8a 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -1365,7 +1365,7 @@ extern char sh_additional_register_names[ADDREGNAMES_SIZE] \
#define DEFAULT_PCC_STRUCT_RETURN 0
#define SHMEDIA_REGS_STACK_ADJUST() \
- (TARGET_SHCOMPACT && current_function_has_nonlocal_label \
+ (TARGET_SHCOMPACT && current_function_saves_all_registers \
? (8 * (/* r28-r35 */ 8 + /* r44-r59 */ 16 + /* tr5-tr7 */ 3) \
+ (TARGET_FPU_ANY ? 4 * (/* fr36 - fr63 */ 28) : 0)) \
: 0)
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 4269969..591bb70 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -5023,7 +5023,7 @@ label:
[(set (match_dup 0) (match_dup 1))]
"
{
- if (TARGET_SHCOMPACT && current_function_has_nonlocal_label)
+ if (TARGET_SHCOMPACT && current_function_saves_all_registers)
operands[1] = gen_frame_mem (SImode, return_address_pointer_rtx);
}")