Subject: a couple of low level questions
To: None <port-sparc@netbsd.org>
From: John Steele Scott <toojays@toojays.net>
List: port-sparc
Date: 01/05/2003 21:34:21
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I've been playing around with sparc assembly on an IPC with NetBSD instal=
led.=20
I've learnt a lot over the last couple of days, but I have a couple of=20
questions that someone knowledgeable could answer if they have time.

First, page 195 of the "SPARC Architecture Manual" seems to imply that wh=
en=20
saving registers, it would be faster to go two registers at a time, using=
 the=20
std instruction instead of st. Yet in the code which NetBSD uses to save=20
regs, st is used. Why is this?
<http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/arch/sparc/gen/saveregs=
=2ES?rev=3D1.3&content-type=3Dtext/x-cvsweb-markup>

My other question concerns the extra instructions in SPARCv8 which were n=
ot in=20
SPARCv7, i.e. multiplication and division. The "SPARC Architecture Manual=
"=20
proposes that code should call the ".udiv" routine (for example) which wo=
uld=20
then know whether to do the operation in software or hardware. Does this=20
happen on NetBSD? Whereabouts in the libc source can I see this?

Thanks to anyone who takes the time to answer.

cheers,

John
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Messages with missing or bad signatures may have been forged or =
modified in transit!

iD8DBQE+GBFA0BW7kPcXjRURAgS4AJ9j70N5bTlI/SvePiRfOZM7iEkO8gCeIJkt
7DgnETreIFfdeUIrWa8bm4E=3D
=3DHbjN
-----END PGP SIGNATURE-----