From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF6KT-0006dD-Bj for qemu-devel@nongnu.org; Fri, 21 Sep 2012 12:43:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TF6KP-00085Y-1m for qemu-devel@nongnu.org; Fri, 21 Sep 2012 12:43:49 -0400 Received: from hall.aurel32.net ([88.191.126.93]:43341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF6KO-00085B-QY for qemu-devel@nongnu.org; Fri, 21 Sep 2012 12:43:44 -0400 From: Aurelien Jarno Date: Fri, 21 Sep 2012 18:43:23 +0200 Message-Id: <1348245809-13482-5-git-send-email-aurelien@aurel32.net> In-Reply-To: <1348245809-13482-1-git-send-email-aurelien@aurel32.net> References: <1348245809-13482-1-git-send-email-aurelien@aurel32.net> Subject: [Qemu-devel] [PATCH 04/10] tcg/mips: don't use global pointer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Aurelien Jarno Don't use the global pointer in TCG, in case helpers try access global variables. Signed-off-by: Aurelien Jarno --- tcg/mips/tcg-target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c index 8b38f98..0ea6a76 100644 --- a/tcg/mips/tcg-target.c +++ b/tcg/mips/tcg-target.c @@ -1529,7 +1529,6 @@ static int tcg_target_callee_save_regs[] = { TCG_REG_S5, TCG_REG_S6, TCG_REG_S7, - TCG_REG_GP, TCG_REG_FP, TCG_REG_RA, /* should be last for ABI compliance */ }; @@ -1595,6 +1594,7 @@ static void tcg_target_init(TCGContext *s) tcg_regset_set_reg(s->reserved_regs, TCG_REG_T0); /* internal use */ tcg_regset_set_reg(s->reserved_regs, TCG_REG_RA); /* return address */ tcg_regset_set_reg(s->reserved_regs, TCG_REG_SP); /* stack pointer */ + tcg_regset_set_reg(s->reserved_regs, TCG_REG_GP); /* global pointer */ tcg_add_target_add_op_defs(mips_op_defs); tcg_set_frame(s, TCG_AREG0, offsetof(CPUArchState, temp_buf), -- 1.7.10.4