Subject: Re: Machine-language reference sought
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Simon Burge <simonb@wasabisystems.com>
List: port-alpha
Date: 01/09/2004 23:39:35
On Fri, Jan 09, 2004 at 12:31:09AM -0500, der Mouse wrote:

> I'd also be interested to find any documentation explaining which
> registers are reserved, and for what uses, under NetBSD/alpha.  Perhaps
> it's lurking somewhere, but I've never found it.

At a simple level, the register names in arch/alpha/include/reg.h provide
some info.

	A0 - A5  = function arguments
	AT       = assembler temp reg [*]
	GP       = global data pointer
	RA       = return address when leaving function
	S0 - S6  = saved regs - need to be preserved by called function
	SP       = stack pointer
	T0 - T12 = temporary regs - need to be saved by calling function
		   if you want to keep them
	V0       = return value register
	ZERO     = guess :-)

[*] If this is the same as the MIPS AT register.  Macros can use this
register if they need somewhere to hold an intermediary result.  In
a nutshell, if you know MIPS register usage you probably know Alpha
register usage.

> I'm contemplating writing some somewhat unusual code, and I suspect I'm
> going to want all the registers I can get.

OK, I'm curious!  Can you give any more details?

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