From patchwork Mon Nov 23 20:49:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Froyd X-Patchwork-Id: 39102 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 DCF4C1007D1 for ; Tue, 24 Nov 2009 08:19:02 +1100 (EST) Received: from localhost ([127.0.0.1]:59078 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCgJI-0006Gt-4F for incoming@patchwork.ozlabs.org; Mon, 23 Nov 2009 16:19:00 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NCfye-0001U8-CK for qemu-devel@nongnu.org; Mon, 23 Nov 2009 15:57:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NCfyZ-0001LW-Iv for qemu-devel@nongnu.org; Mon, 23 Nov 2009 15:57:39 -0500 Received: from [199.232.76.173] (port=32861 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCfyZ-0001L9-66 for qemu-devel@nongnu.org; Mon, 23 Nov 2009 15:57:35 -0500 Received: from mx20.gnu.org ([199.232.41.8]:27856) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NCfyY-0006D9-UG for qemu-devel@nongnu.org; Mon, 23 Nov 2009 15:57:35 -0500 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NCfyY-0000GX-4H for qemu-devel@nongnu.org; Mon, 23 Nov 2009 15:57:34 -0500 Received: (qmail 30646 invoked from network); 23 Nov 2009 20:50:10 -0000 Received: from unknown (HELO localhost) (froydnj@127.0.0.2) by mail.codesourcery.com with ESMTPA; 23 Nov 2009 20:50:10 -0000 From: Nathan Froyd To: qemu-devel@nongnu.org Date: Mon, 23 Nov 2009 12:49:59 -0800 Message-Id: <1259009409-2755-2-git-send-email-froydnj@codesourcery.com> X-Mailer: git-send-email 1.6.3.2 In-Reply-To: <1259009409-2755-1-git-send-email-froydnj@codesourcery.com> References: <1259009409-2755-1-git-send-email-froydnj@codesourcery.com> X-detected-operating-system: by mx20.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Subject: [Qemu-devel] [PATCH 01/11] target-mips: add ISAMode bits for mips16 execution 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 Signed-off-by: Nathan Froyd --- target-mips/cpu.h | 1 + target-mips/translate.c | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index 82f9a38..e8febe6 100644 --- a/target-mips/cpu.h +++ b/target-mips/cpu.h @@ -167,6 +167,7 @@ struct TCState { target_ulong CP0_TCContext; target_ulong CP0_TCSchedule; target_ulong CP0_TCScheFBack; + uint32_t ISAMode; /* MIPS32 or MIPS16 mode */ int32_t CP0_Debug_tcstatus; }; diff --git a/target-mips/translate.c b/target-mips/translate.c index e9d9224..b0a1b29 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -463,6 +463,7 @@ typedef struct DisasContext { struct TranslationBlock *tb; target_ulong pc, saved_pc; uint32_t opcode; + int isa_mode; int singlestep_enabled; /* Routine used to access memory */ int mem_idx; @@ -8306,6 +8307,7 @@ gen_intermediate_code_internal (CPUState *env, TranslationBlock *tb, ctx.pc = pc_start; ctx.saved_pc = -1; ctx.singlestep_enabled = env->singlestep_enabled; + ctx.isa_mode = env->active_tc.ISAMode; ctx.tb = tb; ctx.bstate = BS_NONE; /* Restore delay slot state from the tb context. */