summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-31 04:59:45 +0000
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-31 04:59:45 +0000
commit5e11de885b49f08477a4ca1ef7c07b7c04ccedfa (patch)
tree169c07117c4dd277b8bdd8871069c4ab09f34342
parent82160980c77f992f8ddb32602bce16aebe01b10b (diff)
downloadppe42-gcc-5e11de885b49f08477a4ca1ef7c07b7c04ccedfa.tar.gz
ppe42-gcc-5e11de885b49f08477a4ca1ef7c07b7c04ccedfa.zip
* config/sh/sh.md (UNSPECV_SP_SWITCH_B): New.
(UNSPECV_SP_SWITCH_E): New. (sp_switch_1): Change to an unspec. (sp_switch_2): Change to an unspec. Don't use post-inc when we replace $r15. * config/sh/sh.c (sh_expand_prologue): Use the constant pool to reference the new stack's address git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150306 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/sh/sh.c10
2 files changed, 18 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f5c6a4f87dc..6f24540a9fa 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2009-07-31 DJ Delorie <dj@redhat.com>
+
+ * config/sh/sh.md (UNSPECV_SP_SWITCH_B): New.
+ (UNSPECV_SP_SWITCH_E): New.
+ (sp_switch_1): Change to an unspec.
+ (sp_switch_2): Change to an unspec. Don't use post-inc when we
+ replace $r15.
+ * config/sh/sh.c (sh_expand_prologue): Use the constant pool to
+ reference the new stack's address
+
2009-07-30 Sebastian Pop <sebastian.pop@amd.com>
* Makefile.in (OBJS-common): Added dependence on graphite-blocking.o,
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 788b0fe1391..5b555f83e1a 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -6743,13 +6743,19 @@ sh_expand_prologue (void)
/* If we're supposed to switch stacks at function entry, do so now. */
if (sp_switch_attr)
{
+ rtx lab, newsrc;
/* The argument specifies a variable holding the address of the
stack the interrupt function should switch to/from at entry/exit. */
+ tree arg = TREE_VALUE ( TREE_VALUE (sp_switch_attr));
const char *s
- = ggc_strdup (TREE_STRING_POINTER (TREE_VALUE (sp_switch_attr)));
+ = ggc_strdup (TREE_STRING_POINTER (arg));
rtx sp_switch = gen_rtx_SYMBOL_REF (Pmode, s);
- emit_insn (gen_sp_switch_1 (sp_switch));
+ lab = add_constant (sp_switch, SImode, 0);
+ newsrc = gen_rtx_LABEL_REF (VOIDmode, lab);
+ newsrc = gen_const_mem (SImode, newsrc);
+
+ emit_insn (gen_sp_switch_1 (newsrc));
}
d = calc_live_regs (&live_regs_mask);
OpenPOWER on IntegriCloud