On Thu, Jan 06, 2011 at 03:54:46PM +0000, Peter Maydell wrote:
> On 6 January 2011 15:50, Aurelien Jarno <aurel...@aurel32.net> 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
aurel...@aurel32.net                 http://www.aurel32.net

Reply via email to