aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-18 01:58:52 +0000
committermalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-18 01:58:52 +0000
commit17ca26e7918353ae67fa9cfcbf61e3b90a1b3a6b (patch)
treeffb408e0895fd3a172708fd60ad3f0664e6f2c49
parent07bf2857b8517711b5af2c516208bf87c546419f (diff)
downloadqemu-17ca26e7918353ae67fa9cfcbf61e3b90a1b3a6b.zip
qemu-17ca26e7918353ae67fa9cfcbf61e3b90a1b3a6b.tar.gz
qemu-17ca26e7918353ae67fa9cfcbf61e3b90a1b3a6b.tar.bz2
Save LR into proper place on callers stack frame
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4745 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--tcg/ppc/tcg-target.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c
index bc98551..c829b64 100644
--- a/tcg/ppc/tcg-target.c
+++ b/tcg/ppc/tcg-target.c
@@ -823,7 +823,7 @@ void tcg_target_qemu_prologue (TCGContext *s)
| (i * 4 + 8 + TCG_STATIC_CALL_ARGS_SIZE)
)
);
- tcg_out32 (s, STW | RS (0) | RA (1) | (frame_size - 4));
+ tcg_out32 (s, STW | RS (0) | RA (1) | (frame_size + 4));
tcg_out32 (s, MTSPR | RS (3) | CTR);
tcg_out32 (s, BCCTR | BO_ALWAYS);
@@ -836,7 +836,7 @@ void tcg_target_qemu_prologue (TCGContext *s)
| (i * 4 + 8 + TCG_STATIC_CALL_ARGS_SIZE)
)
);
- tcg_out32 (s, LWZ | RT (0) | RA (1) | (frame_size - 4));
+ tcg_out32 (s, LWZ | RT (0) | RA (1) | (frame_size + 4));
tcg_out32 (s, MTSPR | RS (0) | LR);
tcg_out32 (s, ADDI | RT (1) | RA (1) | frame_size);
tcg_out32 (s, BCLR | BO_ALWAYS);