Commit 17ca26e7918353ae67fa9cfcbf61e3b90a1b3a6b
1 parent
07bf2857
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
Showing
1 changed file
with
2 additions
and
2 deletions
tcg/ppc/tcg-target.c
... | ... | @@ -823,7 +823,7 @@ void tcg_target_qemu_prologue (TCGContext *s) |
823 | 823 | | (i * 4 + 8 + TCG_STATIC_CALL_ARGS_SIZE) |
824 | 824 | ) |
825 | 825 | ); |
826 | - tcg_out32 (s, STW | RS (0) | RA (1) | (frame_size - 4)); | |
826 | + tcg_out32 (s, STW | RS (0) | RA (1) | (frame_size + 4)); | |
827 | 827 | |
828 | 828 | tcg_out32 (s, MTSPR | RS (3) | CTR); |
829 | 829 | tcg_out32 (s, BCCTR | BO_ALWAYS); |
... | ... | @@ -836,7 +836,7 @@ void tcg_target_qemu_prologue (TCGContext *s) |
836 | 836 | | (i * 4 + 8 + TCG_STATIC_CALL_ARGS_SIZE) |
837 | 837 | ) |
838 | 838 | ); |
839 | - tcg_out32 (s, LWZ | RT (0) | RA (1) | (frame_size - 4)); | |
839 | + tcg_out32 (s, LWZ | RT (0) | RA (1) | (frame_size + 4)); | |
840 | 840 | tcg_out32 (s, MTSPR | RS (0) | LR); |
841 | 841 | tcg_out32 (s, ADDI | RT (1) | RA (1) | frame_size); |
842 | 842 | tcg_out32 (s, BCLR | BO_ALWAYS); | ... | ... |