Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lhl6S-00055J-8U for qemu-devel@nongnu.org; Thu, 12 Mar 2009 09:37:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lhl6R-000556-A6 for qemu-devel@nongnu.org; Thu, 12 Mar 2009 09:37:39 -0400 Received: from [199.232.76.173] (port=38569 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lhl6R-000553-2F for qemu-devel@nongnu.org; Thu, 12 Mar 2009 09:37:39 -0400 Received: from hall.aurel32.net ([88.191.82.174]:57204) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lhl6Q-0007dG-Kv for qemu-devel@nongnu.org; Thu, 12 Mar 2009 09:37:38 -0400 Date: Thu, 12 Mar 2009 14:37:36 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 0/9] tcg: reorganize bswap* functions Message-ID: <20090312133736.GB10898@hall.aurel32.net> References: <20090311170836.GD32521@hall.aurel32.net> <200903121229.47365.paul@codesourcery.com> <20090312125632.GO24377@volta.aurel32.net> <200903121331.31042.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <200903121331.31042.paul@codesourcery.com> Sender: Aurelien Jarno Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org On Thu, Mar 12, 2009 at 01:31:30PM +0000, Paul Brook wrote: > > > I think we want to preserve the zero extension of the value, i.e. you > > > want something along the lines of: > > > > > > if (!TCGV_EQUAL_I64(ret, arg)) > > > tcg_gen_movi_i32(TCGV_HIGH(ret), 0); > > > > That's why I have modified the documentation to say the high bytes have > > to be zero, similar to the current bswap16_i32 implementation. > > There are two issues here: > > - Requiring a zero extended input value. > - Providing a zero extended result. > > Your documentation covers the former requirement. However it does not mention > the latter. The existing bswap16_i32 implementation does provide this > guarantee (and can be simplified if we do not require this). I expect it is > worth preserving the zero extension. Thanks for your explanations, I see your point. I'll fix that before committing the series. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net