Received: from [140.186.70.92] (port=35564 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pata8-0001Xg-Cg for qemu-devel@nongnu.org; Thu, 06 Jan 2011 12:25:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pata7-0006Ms-8o for qemu-devel@nongnu.org; Thu, 06 Jan 2011 12:25:00 -0500 Received: from hall.aurel32.net ([88.191.126.93]:50695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pata7-0006Mf-3y for qemu-devel@nongnu.org; Thu, 06 Jan 2011 12:24:59 -0500 Date: Thu, 6 Jan 2011 18:24:57 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] target-arm: fix SMMLA/SMMLS instructions Message-ID: <20110106172457.GB2343@hall.aurel32.net> References: <1293906328-8984-1-git-send-email-aurelien@aurel32.net> <20110106155005.GA2343@hall.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: 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 Thu, Jan 06, 2011 at 03:54:46PM +0000, Peter Maydell wrote: > On 6 January 2011 15:50, Aurelien Jarno wrote: > > On Wed, Jan 05, 2011 at 11:15:15AM +0000, Peter Maydell wrote: > > >> Isn't this adding b to the msw of a, rather than the other > >> way round as the comment claims? > > > > I think the comment is actually wrong in both way, as a shift is > > applied, and thus lsw of b is used as the msw in the addition. > > We add the whole of b, not the lsw of b, because it's only > 32 bits to start with (ie "lsw of b" is a longwinded way of > saying "b"). > > > What about "Add a to (b << 32). Mark inputs as dead."? > > To me "Add x to y" means "y = y + x". In this case that would > mean "(b << 32) = (b << 32) + a", which is nonsensical. > "Add (b << 32) to a" or equivalently "add b to the msw of a" > makes more sense to me. > Ok, will use that in the next version. For the subtraction, how would you say a = (b << 32) - a ? -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net