Port-powerpc archive

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

Re: about powerpc version of in{,4}_cksum



On Wed, Jul 31, 2002 at 12:05:15AM +0900, enami tsugutomo wrote:

> `addic rD, rA, SIMMM' is defined as (as far as according to my
> manual):
> 
>       rD <- (rA) + EXTS(SIMM)
> 
> So, no carry is added (but carry is affected), and if SIMM is zero,
> carry bit always cleared.  So, addic 0,0,0 should be nop except that
> it clears carry bit.  Am I losing something?

Ah, no, you are correct.  Even looking at the manual, I still managed
to confuse "addic" (add immediate carrying) thinking that it added the
carry bit in as well as setting it.  "adde" appears to be the instruction
that does this.

As you said in another email - many thanks to tsubai!

> Please read the rs6000.h.  The differnce is whether r0 can be used or
> not.  And if you read my diff, you will notoice that forcing r0 for
> the variable `n' is no longer necessary.

Yes, that all makes sense now too.

> Could you please provide me your test case?  As I wrote in my mail, I
> just test only single pattern.

I'll put my test code on ftp.netbsd.org a bit latter today.  I do
have a static binary (static because it uses a soft-float libc) at
ftp://ftp.netbsd.org/pub/NetBSD/misc/simonb/ppc-cksum

Thanks again for this!

Simon.
--
Simon Burge                                   
<simonb%wasabisystems.com@localhost>
NetBSD Development, Support and Service:   http://www.wasabisystems.com/



Home | Main Index | Thread Index | Old Index