Re: [cc65] When not to use fastcall?

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2004-11-20 10:17:31
Hi!

On Fri, Nov 19, 2004 at 04:28:58PM -0800, Shawn Jefferson wrote:
> After looking at the assembly that my code is
> producing using fastcall, I realize that most of my
> functions are pushing the primary register back onto
> the stack anyway, I assume because I am not using the
> values passed to the function right away, but after
> some initializations and computations occur.

If you write a fastcall function in C, fastcall is actually a size, and not a
speed optimization. Pushing the last parameter is moved into the the prologue
of the called function, so it is done just once, not each time the function is
called. The compiler will never just use the value in the register as is,
because the cases in which this is possible are very rare.

> Am I correct in thinking that I have answer my own
> question about when not to use fastcall?

I don't know what you are refering to, but what I said in my last mail about
exceptions is still true.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Nov 20 10:17:35 2004

This archive was generated by hypermail 2.1.8 : 2004-11-20 10:17:45 CET