Received: from eggs.gnu.org ([208.118.235.92]:33313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6L2H-0005g1-R4 for qemu-devel@nongnu.org; Tue, 28 Aug 2012 08:36:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6L2B-00031U-RK for qemu-devel@nongnu.org; Tue, 28 Aug 2012 08:36:49 -0400 Received: from hall.aurel32.net ([88.191.126.93]:51134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6L2B-0002zj-LT for qemu-devel@nongnu.org; Tue, 28 Aug 2012 08:36:43 -0400 Date: Tue, 28 Aug 2012 14:36:34 +0200 From: Aurelien Jarno Message-ID: <20120828123634.GF17750@hall.aurel32.net> References: <1346107896-28955-1-git-send-email-aurelien@aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: Sender: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] tcg/mips: fix broken CONFIG_TCG_PASS_AREG0 code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org On Tue, Aug 28, 2012 at 01:19:21PM +0100, Peter Maydell wrote: > On 27 August 2012 23:51, Aurelien Jarno wrote: > > The CONFIG_TCG_PASS_AREG0 code for calling ld/st helpers was > > broken in that it did not respect the ABI requirement that 64 > > bit values were passed in even-odd register pairs. The simplest > > way to fix this is to implement some new utility functions > > for marshalling function arguments into the correct registers > > and stack, so that the code which sets up the address and > > data arguments does not need to care whether there has been > > a preceding env argument. > > > > Based on commit 9716ef3b for ARM by Peter Maydell. > > > > Signed-off-by: Aurelien Jarno > > Reviewed-by: Peter Maydell Thanks for the review. > Not tested, since I don't have any MIPS boxes. But it looks right, > and I went through and checked that the register constraints > were right, which I think is the most likely spot for subtle > bugs. Agreed, actually I got such issues when initially testing the patch (with a 64-bit guest on a 32-bit host it's quite easy to reach the maximum number of registers, even if mips has 32 of them). I should have added that I have tested this patch on mips an mipsel hosts, with i386, x86_64, ppc, mips, mipsel, mips64 and mips64el guests. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net