Subject: question about sys/arch/m68k/m68k/copypage.s
To: None <port-m68k@netbsd.org>
From: Matthew Fredette <fredette@MIT.EDU>
List: port-m68k
Date: 02/06/2001 17:32:56
Hi. I've got a quick question about sys/arch/m68k/m68k/copypage.s.
This is the copypage function in -current:
ENTRY(copypage)
movl %sp@(4),%a0 | source address
movl %sp@(8),%a1 | destiniation address
movw #NBPG/32-1,%d0 | number of 32 byte chunks - 1
Lmlloop:
movl %a0@+,%a1@+
movl %a0@+,%a1@+
movl %a0@+,%a1@+
movl %a0@+,%a1@+
movl %a0@+,%a1@+
movl %a0@+,%a1@+
movl %a0@+,%a1@+
movl %a0@+,%a1@+
dbf %d0,Lmlloop
rts
Is that movw to load the loop count into %d0 correct? I'm new to
680x0 assembly, but doesn't this leave garbage in the high word
of %d0, when the dbf is going to decrement all of %d0 to -1?
(Please cc: me on replies, as I'm not on port-m68k)
Thanks,
Matt
--
Matt Fredette
fredette@aquery.com, fredette@mit.edu, fredette@theory.lcs.mit.edu
http://mit.edu/fredette/www
"If you understood everything I said, you'd be me." - Miles Davis