From patchwork Thu May 20 14:52:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Froyd X-Patchwork-Id: 53079 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 216BCB7D4A for ; Fri, 21 May 2010 00:57:20 +1000 (EST) Received: from localhost ([127.0.0.1]:50874 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OF7BT-0002zV-SA for incoming@patchwork.ozlabs.org; Thu, 20 May 2010 10:57:15 -0400 Received: from [140.186.70.92] (port=44888 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OF77L-0001EA-RW for qemu-devel@nongnu.org; Thu, 20 May 2010 10:53:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OF76w-00082E-LW for qemu-devel@nongnu.org; Thu, 20 May 2010 10:52:59 -0400 Received: from mail.codesourcery.com ([38.113.113.100]:35515) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OF76w-00081i-DU for qemu-devel@nongnu.org; Thu, 20 May 2010 10:52:34 -0400 Received: (qmail 28711 invoked from network); 20 May 2010 14:52:33 -0000 Received: from unknown (HELO localhost) (froydnj@127.0.0.2) by mail.codesourcery.com with ESMTPA; 20 May 2010 14:52:33 -0000 From: Nathan Froyd To: qemu-devel@nongnu.org Date: Thu, 20 May 2010 07:52:30 -0700 Message-Id: <1274367150-26576-11-git-send-email-froydnj@codesourcery.com> X-Mailer: git-send-email 1.6.3.2 In-Reply-To: <1274367150-26576-1-git-send-email-froydnj@codesourcery.com> References: <1274367150-26576-1-git-send-email-froydnj@codesourcery.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: aurelien@aurel32.net Subject: [Qemu-devel] [PATCH 10/10] hw: honor low bit in mipssim machine 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 --- hw/mips_mipssim.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/mips_mipssim.c b/hw/mips_mipssim.c index a747de5..cd6c2be 100644 --- a/hw/mips_mipssim.c +++ b/hw/mips_mipssim.c @@ -106,7 +106,9 @@ static void main_cpu_reset(void *opaque) CPUState *env = s->env; cpu_reset(env); - env->active_tc.PC = s->vector; + env->active_tc.PC = s->vector & ~(target_ulong)1; + if (s->vector & 1) + env->hflags |= MIPS_HFLAG_M16; } static void