Received: from eggs.gnu.org ([2001:4830:134:3::10]:57498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmLHJ-00028x-5I for qemu-devel@nongnu.org; Mon, 19 May 2014 06:58:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WmLHB-0003Qj-MH for qemu-devel@nongnu.org; Mon, 19 May 2014 06:58:45 -0400 Received: from s16892447.onlinehome-server.info ([82.165.15.123]:46275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmLHB-0003Qa-GC for qemu-devel@nongnu.org; Mon, 19 May 2014 06:58:37 -0400 Message-ID: <5379E34F.8080208@ilande.co.uk> Date: Mon, 19 May 2014 11:56:15 +0100 From: Mark Cave-Ayland MIME-Version: 1.0 References: <5378AC30.9090900@ilande.co.uk> <5378DA7A.2070902@caramail.com> In-Reply-To: <5378DA7A.2070902@caramail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] target-sparc has inverse cwp logic for SAVE/RESTORE? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Olivier Danet , qemu-devel Cc: Blue Swirl , Richard Henderson On 18/05/14 17:06, Olivier Danet wrote: > The problem may be related to the fact that the 32bits SPARCv8 and 64bits SPARCv9 work in opposite directions ! > > SparcV9 standard, page 360/399 : > The SPARC-V9 CWP register is incremented during a SAVE instruction and decremented during > a RESTORE instruction. Although this is the opposite of PSR.CWP’s behavior in SPARC-V8, the > only software it should affect is a few trap handlers that operate in privileged mode, and that must > be rewritten for SPARC-V9 anyway. This change will have no effect on nonprivileged software. Ah I wonder if that could be it? I did try swapping the increment/decrement operators around in the helpers, however OpenBIOS crashed fairly early on so it's obviously not as simple as that. I suspect that because a lot of the code is shared been v8/v9 then there are some other assumptions that would need to be corrected for this to work :/ ATB, Mark.