[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [f-cpu] New suggestion about call convention
cedric wrote:
> Well it's not so easy. What append if :
>
> A call B
> B call C
> C call an external function
> This external function call A.
>
> You don't have any information about the external function, so you must save
> all register before calling it (I really mean all, not only the one that used
> by C, but the one that are used by B too, because B will certainly crash
> them).
>
But the point is you have all the calling information.
It may mean a extra pass in the compiler but it can be done.
Also since this works best with leaf functions you could do this with
say three passes. pass #1 all functions with no calls or system calls
only. pass #2 all functions that call level #1 functions ... pass #3
all functions that call level #2 and #1 functions.
At the same time functions could be tagged for in-line macro
replacement. The old compile/run time trade off again.
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu in the body. http://f-cpu.seul.org/