Newsgroups: comp.compilers
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!decwrl!world!iecc!compilers-sender
From: mauney@eos.ncsu.edu (Dr. Jon Mauney)
Subject: Re: Parameter Passing Via Registers
Message-ID: <1991May1.144334.5109@ncsu.edu>
Keywords: Pascal, registers, optimize, Modula
Sender: compilers-sender@iecc.cambridge.ma.us
Reply-To: mauney@eos.ncsu.edu (Dr. Jon Mauney)
Organization: Project EOS - North Carolina State University
References: <1991Apr30.022048.4539@iecc.cambridge.ma.us> <MIKE.91Apr30152206@yalla.tuwien.ac.at>
Date: Thu, 02 May 91 14:57:03 GMT
Approved: compilers@iecc.cambridge.ma.us

Most of the discussion has mentioned ways of forcing parameters passed in
registers onto the stack for non-local reference.  Note that it is not
strictly necessary for such parameters to be on the stack.  Since the
references occur within internal functions, code could be compiled to use
the value in the register.  You would have to change the calling sequence
so as to preserve the register, but you have control of both sides of the
call, so that is possible.  Conceivably, this could be done even if the
procedure is passed as a parameter -- just make sure the register value is
part of the closure that you pass.

I'm not claiming it's worth the trouble...  

--
Jon Mauney,  parsing partisan
Computer Science Dept.
N.C. State University
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
