Re: [cc65] Optimizing C code

Date view Thread view Subject view

From: Groepaz (groepaz_at_gmx.net)
Date: 2003-09-05 10:34:36


On Thursday 04 September 2003 18:13, Ullrich von Bassewitz wrote:
> What does that mean? A global variable in a zero page register? No that is
> currently not possible and it would also be difficult to implement, at
> least when using the standard register space in the zero page. Assume a
> function like:
>
>         register unsigned g;
>
>         void f (void)
>         {
>             register unsigned foo, bar, faz;
>             ....
>         }
>
> Since the function uses the complete register bank (6 bytes), the variable
> g would be shadowed by the local variables, as a result an access is no
> longer possible (the old value of g was saved on the stack).

mmmh yes, the pushing/popping register bank to/from stack at each function 
entry/exit is exactly what i want to get rid of, since its kindof a 
performance killer :o)

is there another way then that would let me do that with a "custom" memory 
range in zp then? if possible something that would allow me to use my 
variables as before (and not having to convert them to pointers or sth)?

gpz


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-09-05 10:39:40 CEST