summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-24 01:38:32 +0000
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-24 01:38:32 +0000
commit8f177faf8012b032eef03915aa43317fe152179a (patch)
treeff7b109a3501f6617ec32bd91dabbe2d5820f7e9
parent35967f85cfaaca578473120708bc74609c076434 (diff)
downloadppe42-gcc-8f177faf8012b032eef03915aa43317fe152179a.tar.gz
ppe42-gcc-8f177faf8012b032eef03915aa43317fe152179a.zip
* pa.c (hppa_expand_prologue): Do pic register save in frame marker
without adding a frame note. * pa.md (allocate_stack): Save pic register in new frame marker when generating pic code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71709 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/pa/pa.c12
-rw-r--r--gcc/config/pa/pa.md15
3 files changed, 27 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e0890b3c417..67ac8926f26 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2003-09-23 John Davind Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * pa.c (hppa_expand_prologue): Do pic register save in frame marker
+ without adding a frame note.
+ * pa.md (allocate_stack): Save pic register in new frame marker when
+ generating pic code.
+
2003-09-23 Kelley Cook <kelleycook@wideopenwest.com>
* cgraphunit.c (cgraph_expand_all_functions): Renamed from
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 9c207d6d591..a7a55881e3f 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -3475,9 +3475,17 @@ hppa_expand_prologue (void)
when generating PIC code. FIXME: What is the correct thing
to do for functions which make no calls and allocate no
frame? Do we need to allocate a frame, or can we just omit
- the save? For now we'll just omit the save. */
+ the save? For now we'll just omit the save.
+
+ We don't want a note on this insn as the frame marker can
+ move if there is a dynamic stack allocation. */
if (flag_pic && actual_fsize != 0 && !TARGET_64BIT)
- store_reg (PIC_OFFSET_TABLE_REGNUM, -32, STACK_POINTER_REGNUM);
+ {
+ rtx addr = gen_rtx_PLUS (word_mode, stack_pointer_rtx, GEN_INT (-32));
+
+ emit_move_insn (gen_rtx_MEM (word_mode, addr), pic_offset_table_rtx);
+
+ }
/* Align pointer properly (doubleword boundary). */
offset = (offset + 7) & ~7;
diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md
index b5c994017ba..f6d9238c691 100644
--- a/gcc/config/pa/pa.md
+++ b/gcc/config/pa/pa.md
@@ -8061,17 +8061,22 @@
""
"
{
+ rtx addr;
+
/* Since the stack grows upward, we need to store virtual_stack_dynamic_rtx
in operand 0 before adjusting the stack. */
emit_move_insn (operands[0], virtual_stack_dynamic_rtx);
anti_adjust_stack (operands[1]);
if (TARGET_HPUX_UNWIND_LIBRARY)
{
- rtx dst = gen_rtx_MEM (word_mode,
- gen_rtx_PLUS (word_mode, stack_pointer_rtx,
- GEN_INT (TARGET_64BIT ? -8 : -4)));
-
- emit_move_insn (dst, frame_pointer_rtx);
+ addr = gen_rtx_PLUS (word_mode, stack_pointer_rtx,
+ GEN_INT (TARGET_64BIT ? -8 : -4));
+ emit_move_insn (gen_rtx_MEM (word_mode, addr), frame_pointer_rtx);
+ }
+ if (!TARGET_64BIT && flag_pic)
+ {
+ rtx addr = gen_rtx_PLUS (word_mode, stack_pointer_rtx, GEN_INT (-32));
+ emit_move_insn (gen_rtx_MEM (word_mode, addr), pic_offset_table_rtx);
}
DONE;
}")
OpenPOWER on IntegriCloud