From patchwork Mon May 24 16:19:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Froyd X-Patchwork-Id: 53448 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 ACE5FB6ED0 for ; Tue, 25 May 2010 02:43:53 +1000 (EST) Received: from localhost ([127.0.0.1]:47418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGakl-0000yY-3r for incoming@patchwork.ozlabs.org; Mon, 24 May 2010 12:43:47 -0400 Received: from [140.186.70.92] (port=49976 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGaNw-00023G-7w for qemu-devel@nongnu.org; Mon, 24 May 2010 12:20:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGaNY-00015b-Cs for qemu-devel@nongnu.org; Mon, 24 May 2010 12:20:00 -0400 Received: from mail.codesourcery.com ([38.113.113.100]:33425) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGaNX-00014D-T8 for qemu-devel@nongnu.org; Mon, 24 May 2010 12:19:48 -0400 Received: (qmail 27944 invoked from network); 24 May 2010 16:19:46 -0000 Received: from unknown (HELO localhost) (froydnj@127.0.0.2) by mail.codesourcery.com with ESMTPA; 24 May 2010 16:19:46 -0000 From: Nathan Froyd To: qemu-devel@nongnu.org Date: Mon, 24 May 2010 09:19:43 -0700 Message-Id: <1274717984-25887-10-git-send-email-froydnj@codesourcery.com> X-Mailer: git-send-email 1.6.3.2 In-Reply-To: <1274717984-25887-1-git-send-email-froydnj@codesourcery.com> References: <1274717984-25887-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 09/10] linux-user: honor low bit of entry PC for MIPS 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 --- linux-user/main.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 18b52c0..76d443b 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -3192,7 +3192,9 @@ int main(int argc, char **argv, char **envp) for(i = 0; i < 32; i++) { env->active_tc.gpr[i] = regs->regs[i]; } - env->active_tc.PC = regs->cp0_epc; + env->active_tc.PC = regs->cp0_epc & ~(target_ulong)1; + if (regs->cp0_epc & 1) + env->hflags |= MIPS_HFLAG_M16; } #elif defined(TARGET_SH4) {