qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 0/9] tcg: reorganize bswap* functions


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [PATCH 0/9] tcg: reorganize bswap* functions
Date: Thu, 12 Mar 2009 14:37:36 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

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
address@hidden                 http://www.aurel32.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]