|
From: | Julian Seward |
Subject: | Re: [Qemu-devel] [PATCH] ppc32 guests: fix computation of XER.{CA, OV} in addme, subfme, mullwo |
Date: | Thu, 19 Jun 2008 09:36:58 +0200 |
User-agent: | KMail/1.9.5 |
> > addme 00000000 XER.CA=1 = 00000000 (cr 00000000 xer 20000000) > > Did I miss the obvious, but why does 0 + 1 - 1 generate a carry ? Because (as per the docs) it's computing rA + XER.CA + 0xFFFF_FFFF, which is 0 + 1 + 0xFFFF_FFFF == 0x1_0000_0000. Which does indeed carry. I tested now on both a 7447 and a G5 and they both do that. On a real 7447: mullwo. 000f423f ffffffff = fff0bdc1 (cr 80000000 xer 00000000) addme 00000000 XER.CA=1 = 00000000 (cr 00000000 xer 20000000) subfme 00000000 XER.CA=1 = ffffffff (cr 00000000 xer 20000000) On a real G5: mullwo. 000f423f ffffffff = fff0bdc1 (cr 80000000 xer 00000000) addme 00000000 XER.CA=1 = 00000000 (cr 00000000 xer 20000000) subfme 00000000 XER.CA=1 = ffffffff (cr 00000000 xer 20000000) J
[Prev in Thread] | Current Thread | [Next in Thread] |