Blame 0061-tcg-mips-don-t-use-global-pointer.patch

5544c1
From 9a4f545e4526f946613548a427fcab4c2a089ac0 Mon Sep 17 00:00:00 2001
5544c1
From: Aurelien Jarno <aurelien@aurel32.net>
5544c1
Date: Fri, 21 Sep 2012 18:20:26 +0200
5544c1
Subject: [PATCH] tcg/mips: don't use global pointer
5544c1
5544c1
Don't use the global pointer in TCG, in case helpers try access global
5544c1
variables.
5544c1
5544c1
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
5544c1
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
5544c1
---
5544c1
 tcg/mips/tcg-target.c | 2 +-
5544c1
 1 file changed, 1 insertion(+), 1 deletion(-)
5544c1
5544c1
diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c
5544c1
index 8b38f98..0ea6a76 100644
5544c1
--- a/tcg/mips/tcg-target.c
5544c1
+++ b/tcg/mips/tcg-target.c
5544c1
@@ -1529,7 +1529,6 @@ static int tcg_target_callee_save_regs[] = {
5544c1
     TCG_REG_S5,
5544c1
     TCG_REG_S6,
5544c1
     TCG_REG_S7,
5544c1
-    TCG_REG_GP,
5544c1
     TCG_REG_FP,
5544c1
     TCG_REG_RA,       /* should be last for ABI compliance */
5544c1
 };
5544c1
@@ -1595,6 +1594,7 @@ static void tcg_target_init(TCGContext *s)
5544c1
     tcg_regset_set_reg(s->reserved_regs, TCG_REG_T0);   /* internal use */
5544c1
     tcg_regset_set_reg(s->reserved_regs, TCG_REG_RA);   /* return address */
5544c1
     tcg_regset_set_reg(s->reserved_regs, TCG_REG_SP);   /* stack pointer */
5544c1
+    tcg_regset_set_reg(s->reserved_regs, TCG_REG_GP);   /* global pointer */
5544c1
 
5544c1
     tcg_add_target_add_op_defs(mips_op_defs);
5544c1
     tcg_set_frame(s, TCG_AREG0, offsetof(CPUArchState, temp_buf),
5544c1
-- 
5544c1
1.7.12.1
5544c1