From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,f6dda81e7269c676 X-Google-Attributes: gid111c93,public From: "Martin Sinot" Subject: Re: why only 6 params passed in registers? Date: 2000/01/12 Message-ID: <85hs78$3a7$1@news.telekabel.nl>#1/1 X-Deja-AN: 571613567 References: <85hhsi$lkj$1@nnrp1.deja.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Trace: news.telekabel.nl 947680296 3399 212.142.20.102 (12 Jan 2000 12:31:36 GMT) Organization: SPaSE BV X-MSMail-Priority: Normal NNTP-Posting-Date: 12 Jan 2000 12:31:36 GMT Newsgroups: comp.os.linux.alpha 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