[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] bug found
Örn Hansen <orn.hansen@swipnet.se> writes:
> Hey,
>
> I've been searching for hours for why the arp protocol doesn't work as it's
> supposed to. And finally, I found it. The answer is in bzero, or rather
> quickzero function in the CVS tree.
>
> loop:
> movem.l d1-d7/a1,(a0) | zero the memory, 32 bytes at a time
> movem.l d1-d7/a1,32(a0)
> movem.l d1-d7/a1,64(a0)
> movem.l d1-d7/a1,96(a0)
> movem.l d1-d7/a1,128(a0)
> movem.l d1-d7/a1,160(a0)
> movem.l d1-d7/a1,192(a0)
> movem.l d1-d7/a1,224(a0)
> lea 256(a0),a0
> dbra d0,loop
> movem.l (sp)+,d1-d7/a1 | restore regs
> rts | and leave
>
> There are 8 registers used, and each register is 32bits, or 4 bytes in size.
> That makes a total of 32 bytes as stated in the first line. But notice, the
> loading of the next effective address. It's thinking 256 bytes at a time.
Yes, 32 * 8 == 256.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."