Received: from [140.186.70.92] (port=49109 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdpVn-00054J-JL for qemu-devel@nongnu.org; Fri, 14 Jan 2011 14:40:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdpVm-0002zQ-7D for qemu-devel@nongnu.org; Fri, 14 Jan 2011 14:40:39 -0500 Received: from hall.aurel32.net ([88.191.126.93]:57028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdpVm-0002zI-0j for qemu-devel@nongnu.org; Fri, 14 Jan 2011 14:40:38 -0500 Date: Fri, 14 Jan 2011 20:40:36 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 0/4] target-arm: get IT bits right at exceptions Message-ID: <20110114194036.GC16663@hall.aurel32.net> References: <1294701112-14071-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1294701112-14071-1-git-send-email-peter.maydell@linaro.org> Sender: Aurelien Jarno List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org On Mon, Jan 10, 2011 at 11:11:48PM +0000, Peter Maydell wrote: > This patchset (when combined with my previous patchset "Translate > based on TB flags, not CPUState") is a fix for > https://bugs.launchpad.net/qemu/+bug/581335 > where we were not getting the IT (conditional execution) bits in > the CPSR right when we took an unexpected exception in Thumb mode. > > The linux-user patch fixes an issue exposed by fixing this, where we > weren't clearing the IT bits before entering the signal handler, so > that if we took the signal inside an IT block the first part of the > signal handler wouldn't be executed. > > The first two patches in the series and the long comment in patch 4 > are aimed at making it a bit clearer how we handle the IT bits; it > took me quite a long time to figure out exactly what the existing > code was doing... > > Peter Maydell (4): > target-arm: Remove redundant setting of IT bits before Thumb SWI > target-arm: Refactor translation of exception generating instructions > linux-user: ARM: clear the IT bits when invoking a signal handler > target-arm: Restore IT bits when resuming after an exception > > linux-user/signal.c | 16 +++++---- > target-arm/translate.c | 80 ++++++++++++++++++++++++++++++----------------- > 2 files changed, 60 insertions(+), 36 deletions(-) > Thanks, all applied. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net