Skip to contentSkip to conversation

[4745] Save LR into proper place on callers stack frame

Qemu-devel malc 1 participant 1 message Jun 18, 2008

lore
Share & tools
lore

malc

author
#0 lore raw

Revision: 4745

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4745
Author:   malc
Date:     2008-06-18 01:58:52 +0000 (Wed, 18 Jun 2008)

Log Message:
-----------
Save LR into proper place on callers stack frame

Modified Paths:
--------------
trunk/tcg/ppc/tcg-target.c

Modified: trunk/tcg/ppc/tcg-target.c
===================================================================

tcg/ppc/tcg-target.c +2 -2
@@ -823,7 +823,7 @@
                        | (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 @@
                        | (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);