From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <9f3897940802151547u69c34d7dr1e1b26d36501f71e@mail.gmail.com> Date: Sat, 16 Feb 2008 00:47:49 +0100 From: "=?UTF-8?Q?Pawe=C5=82_Lasek?=" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] Non-stack-based calling conventions In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <781EB76B-227C-4E7F-BAF3-2161589DE8F4@orthanc.ca> Topicbox-Message-UUID: 572b678a-ead3-11e9-9d60-3106f5b1d025 I don't have latest version of fascicle one (MMIX processor architecture and MMIXAL assembler language, from new version of The Art of Computer Programming) at hand, so I can't confirm it, but I remember that MMIX had a special register which implemented a "border", shifting register numbers to use them for procedure data separation. And as in all RISC architectures, storing as many parameters in the call stack is the way to go. Especially when you have 256 64-bit general purpose registers :-) (Now if only someone implemented a sane architecture using MMIX as main processor...) On 2/16/08, Pietro Gagliardi wrote: > - DOS interrupt function calls use the registers, not the stack. > - SPARC and MIPS registers are provided to pass parameters. > > On Feb 15, 2008, at 6:37 PM, Lyndon Nerenberg wrote: > > >> > >> The calling conventions I have seen are the ccall, stdcall > >> (Windows' slightly modified version of the ccall), and pascal. All > >> of them push parameters on the stack. > > > > Take a look at the R-call and S-call conventions used on the IBM > > System 360 architecture. These machines didn't even have a stack. > > > > --lyndon > > -- Paul Lasek