From patchwork Fri Jun 8 01:08:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 163704 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 05D00B6FEF for ; Fri, 8 Jun 2012 14:02:18 +1000 (EST) Received: from localhost ([::1]:51222 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScqOt-0002HI-Us for incoming@patchwork.ozlabs.org; Fri, 08 Jun 2012 00:02:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScngW-0007pF-SS for qemu-devel@nongnu.org; Thu, 07 Jun 2012 21:08:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScngV-0006ve-D0 for qemu-devel@nongnu.org; Thu, 07 Jun 2012 21:08:16 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:47967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScngV-0006vY-7B for qemu-devel@nongnu.org; Thu, 07 Jun 2012 21:08:15 -0400 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1ScngT-0003YR-Mz from Maciej_Rozycki@mentor.com ; Thu, 07 Jun 2012 18:08:13 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 7 Jun 2012 18:07:42 -0700 Received: from [172.30.1.189] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Fri, 8 Jun 2012 02:08:11 +0100 Date: Fri, 8 Jun 2012 02:08:02 +0100 From: "Maciej W. Rozycki" To: Message-ID: User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 X-OriginalArrivalTime: 08 Jun 2012 01:07:42.0338 (UTC) FILETIME=[1B015620:01CD4513] X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 192.94.38.131 X-Mailman-Approved-At: Fri, 08 Jun 2012 00:01:34 -0400 Cc: "Maciej W. Rozycki" , Aurelien Jarno Subject: [Qemu-devel] [PATCH] MIPS/GDB: Correct stub handling of CP1 FIR X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The CP1 FIR register is read-only, ignore any write attempts from the GDB stub. Signed-off-by: Maciej W. Rozycki Reviewed-by: Richard Henderson --- Definitely obvious, please apply. Maciej qemu-mips-fir.diff Index: qemu-git-trunk/gdbstub.c =================================================================== --- qemu-git-trunk.orig/gdbstub.c 2012-06-08 01:11:04.000000000 +0100 +++ qemu-git-trunk/gdbstub.c 2012-06-08 01:42:22.865584444 +0100 @@ -1130,7 +1130,9 @@ static int cpu_gdb_write_register(CPUMIP /* set rounding mode */ RESTORE_ROUNDING_MODE; break; - case 71: env->active_fpu.fcr0 = tmp; break; + case 71: + /* FIR is read-only. Ignore writes. */ + break; } return sizeof(target_ulong); }