Re: [cc65] Optimizing code fails - Found the error!

Date view Thread view Subject view

From: Spiro Trikaliotis (trik-news_at_gmx.de)
Date: 2003-11-22 13:51:49


Hello Uz,

On Sat, Nov 22, 2003 at 12:54:32PM +0100, Ullrich von Bassewitz wrote:

> The optimizer knows which registers must be valid when returning from a
> function by looking at the return type. A function returning void doesn't need
> to return a value in a/x, so the optimizer will remove any code loading
> something into these registers.

Without insight into the CC65 sources, wouldn't it be possible to tell
the compiler that A, X and Y are return types of the function? For
example, the compiler might see this by seeing an RTI is put at the end,
or, as Magervalp suggested, by a modifier at the function declaration.

Just a shot in the dark,
   Spiro.
----------------------------------------------------------------------
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-11-22 13:56:31 CET