From patchwork Thu Jan 6 21:55:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 77814 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 932C7B6F07 for ; Fri, 7 Jan 2011 09:08:21 +1100 (EST) Received: from localhost ([127.0.0.1]:37938 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pay0I-0003IZ-Az for incoming@patchwork.ozlabs.org; Thu, 06 Jan 2011 17:08:18 -0500 Received: from [140.186.70.92] (port=45694 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Paxnf-00054c-H9 for qemu-devel@nongnu.org; Thu, 06 Jan 2011 16:55:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Paxne-0008Pn-IQ for qemu-devel@nongnu.org; Thu, 06 Jan 2011 16:55:15 -0500 Received: from hall.aurel32.net ([88.191.126.93]:43596) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Paxne-0008Pd-Dl for qemu-devel@nongnu.org; Thu, 06 Jan 2011 16:55:14 -0500 Received: from [2001:470:d4ed:0:5e26:aff:fe2b:6f5b] (helo=volta.aurel32.net) by hall.aurel32.net with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Paxna-0004iw-L8; Thu, 06 Jan 2011 22:55:10 +0100 Received: from aurel32 by volta.aurel32.net with local (Exim 4.72) (envelope-from ) id 1PaxnT-0001pf-Id; Thu, 06 Jan 2011 22:55:03 +0100 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Thu, 6 Jan 2011 22:55:02 +0100 Message-Id: <1294350902-6974-1-git-send-email-aurelien@aurel32.net> X-Mailer: git-send-email 1.7.2.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Aurelien Jarno Subject: [Qemu-devel] [PATCH] tcg/mips: fix branch target change during code retranslation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org TCG on MIPS was trying to avoid changing the branch offset, but didn't due to a stupid typo. Fix it. Signed-off-by: Aurelien Jarno --- tcg/mips/tcg-target.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c index 2af7a2e..4e92a50 100644 --- a/tcg/mips/tcg-target.c +++ b/tcg/mips/tcg-target.c @@ -352,7 +352,7 @@ static inline void tcg_out_opc_imm(TCGContext *s, int opc, int rt, int rs, int i static inline void tcg_out_opc_br(TCGContext *s, int opc, int rt, int rs) { /* We need to keep the offset unchanged for retranslation */ - uint16_t offset = (uint16_t)(*(uint32_t *) &s->code_ptr); + uint16_t offset = (uint16_t)(*(uint32_t *) s->code_ptr); tcg_out_opc_imm(s, opc, rt, rs, offset); }