Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: "Martin Sinot" <martin@spase.nl>
Subject: Re: why only 6 params passed in registers?
Date: 2000/01/12	[thread overview]
Message-ID: <85hs78$3a7$1@news.telekabel.nl> (raw)
In-Reply-To: 85hhsi$lkj$1@nnrp1.deja.com


<david_morse@my-deja.com> wrote in message
news:85hhsi$lkj$1@nnrp1.deja.com...
> On alpha unixen the first 6 parameters are passed in registers, and
> further arguments are passed on the stack.  There are a total of 18
> registers that are not saved across calls, why not allow them all to
> contain parameters?  Functions that acutally used > 18 parameters +
> scratch registers would still have stack activity, but the others would
> not.
>
> Just wondering...
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

Umm, how often do you have a function with 18 parameters? Or even six?
Remember that Alphas must have their data in registers to be able to
calculate with it. So a function requiring a large number of parameters
passed in registers probably would have to start with moving some of
these out of the way to be able to calculate. Then, it would be
difficult for such a function to call another function, as this would
destroy the parameter registers. Another need to save the parameter
registers, if you need them later on. Six registers can probably
fairly easy be copied to other registers, which are saved. In my
own programming practice, procedures taking six parameters are already
very rare, let alone functions requiring even more parameters.
So I think six registers to hold parameters is adequate. More is
not necessary and would cause inconvenience. And it's just not worth
the trouble.


--
Martin Sinot
Nijmegen, Netherlands
martin@spase.nl





  parent reply	other threads:[~2000-01-12  5:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-12  5:00 why only 6 params passed in registers? david_morse
2000-01-12  5:00 ` Alex Rhomberg
2000-01-12  5:00 ` Martin Sinot [this message]
2000-01-12  5:00   ` Serguei Patchkovskii
2000-01-14  5:00     ` Chris
2000-01-14  5:00       ` Serguei Patchkovskii
2000-01-14  5:00         ` Chris
2000-01-15  5:00       ` Greg Lindahl
2000-01-15  5:00         ` Chris
2000-01-15  5:00           ` Serguei Patchkovskii
2000-01-16  5:00             ` Chris
2000-01-16  5:00               ` Serguei Patchkovskii
2000-01-14  5:00 ` Steven Hobbs
2000-01-14  5:00   ` Martin Sinot
2000-01-14  5:00     ` Steven Hobbs
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox