Patchwork [16/18] TCG/s390: use TCG_REG_CALL_STACK instead of TCG_REG_R15

login
register
mail settings
Submitter Blue Swirl
Date May 28, 2011, 10:08 a.m.
Message ID <BANLkTi=8T3cqGVXWaef++7oC65WfgzrQ2Q@mail.gmail.com>
Download mbox | patch
Permalink /patch/97788/
State New
Headers show

Comments

Blue Swirl - May 28, 2011, 10:08 a.m.
Use TCG_REG_CALL_STACK instead of TCG_REG_R15 for consistency.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 tcg/s390/tcg-target.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

Patch

diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c
index 2fc5646..e112052 100644
--- a/tcg/s390/tcg-target.c
+++ b/tcg/s390/tcg-target.c
@@ -2298,10 +2298,11 @@  static void tcg_target_init(TCGContext *s)
 static void tcg_target_qemu_prologue(TCGContext *s)
 {
     /* stmg %r6,%r15,48(%r15) (save registers) */
-    tcg_out_insn(s, RXY, STMG, TCG_REG_R6, TCG_REG_R15, TCG_REG_R15, 48);
+    tcg_out_insn(s, RXY, STMG, TCG_REG_R6, TCG_REG_CALL_STACK,
+                 TCG_REG_CALL_STACK, 48);

     /* aghi %r15,-160 (stack frame) */
-    tcg_out_insn(s, RI, AGHI, TCG_REG_R15, -160);
+    tcg_out_insn(s, RI, AGHI, TCG_REG_CALL_STACK, -160);

     if (GUEST_BASE >= 0x80000) {
         tcg_out_movi(s, TCG_TYPE_PTR, TCG_GUEST_BASE_REG, GUEST_BASE);
@@ -2315,7 +2316,8 @@  static void tcg_target_qemu_prologue(TCGContext *s)
     tb_ret_addr = s->code_ptr;

     /* lmg %r6,%r15,208(%r15) (restore registers) */
-    tcg_out_insn(s, RXY, LMG, TCG_REG_R6, TCG_REG_R15, TCG_REG_R15, 208);
+    tcg_out_insn(s, RXY, LMG, TCG_REG_R6, TCG_REG_CALL_STACK,
+                 TCG_REG_CALL_STACK, 208);

     /* br %r14 (return) */
     tcg_out_insn(s, RR, BCR, S390_CC_ALWAYS, TCG_REG_R14);