From fnaumann@mail.cs.uni-magdeburg.de  Tue Dec  2 13:56:33 2003
To: =?iso-8859-1?q?=D6rn_Hansen?= <orn.hansen@swipnet.se>
Cc: mint_list <mint@fishpool.com>
Subject: Re: [MiNT] bug found
References: <200312020512.18959.orn.hansen@swipnet.se>
From: Andreas Schwab <schwab@suse.de>
X-Yow: I love FRUIT PICKERS!!
Date: Tue, 02 Dec 2003 13:51:44 +0100
In-Reply-To: <200312020512.18959.orn.hansen@swipnet.se> (
 =?iso-8859-1?q?=D6rn_Hansen's_message_of?= "Tue, 2 Dec 2003 05:12:12
 +0100")
Message-ID: <jeekvnqt5r.fsf@sykes.suse.de>
User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Delivered-To: mint@fishpool.com
Delivered-To: mint@lists.fishpool.fi
X-ecartis-version: Ecartis v1.0.0
Sender: mint-bounce@lists.fishpool.fi
Errors-to: mint-bounce@lists.fishpool.fi
X-original-sender: schwab@suse.de
Precedence: bulk
List-help: <mailto:ecartis@lists.fishpool.fi?Subject=help>
List-unsubscribe: <mailto:mint-request@lists.fishpool.fi?Subject=unsubscribe>
List-ID: <mint.lists.fishpool.fi>
X-List-ID: <mint.lists.fishpool.fi>

Ö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."


