[cc65] Static parameter passing

From: Dan <opendtv1yahoo.com>
Date: 2007-06-27 03:36:05
--- Dan <opendtv@yahoo.com> wrote:

> An additional related optimization, which I didn't
> mention in my first post, would be to pass
> parameters
> to leaf functions via 'registers' (zero page)
> instead
> of the stack. This would be done for static
> functions
> only.

I implemented this along with static parameter passing
for non-leaf functions, under the following
conditions:

* Cl (static locals) option enabled (can also be
controlled via pragma)
* function declared static
* function not variadic
* & operator not applied to function

Because of the last constraint, two-pass compilation
is required for static parameter passing (maybe this
is why it wasn't implemented before?)

Now it's possible to almost completely avoid using the
slow C stack (as long as you don't use seperate
compilation).

Ullrich, are you interested in any of these patches?

Dan



      ____________________________________________________________________________________
Shape Yahoo! in your own image.  Join our Network Research Panel today!   http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Jun 27 03:36:13 2007

This archive was generated by hypermail 2.1.8 : 2007-06-27 03:36:16 CEST