[kaffe] Re: inlining sysdepCallMethod for m68k-linux

Dalibor Topic robilad at kaffe.org
Tue Apr 27 13:10:02 PDT 2004


Hi Chris,

Chris Gray wrote:
> Dali,

> If you're using alloca() to mean "subtract N bytes from the stack pointer, 
> and tell me where it points now" then you have to realise that you're 
> assuming a _lot_ about how the stack is used.  Especially in an inlined 
> function!

thanks! The alloca() discussion was in the context of dynamical arrays 
provided by gcc [1], though. They are used to pass 'extra' arguments to 
the called function that didn't fit in the registers, as far as I can 
tell. It turns out that some gcc versions have trouble inlining code 
that uses dynamical arrays.

That still leaves me wondering why using dynamic arrays from gcc is safe 
in a macro. I'm not sure whether turning sydepCallMethod from a 
macro/inline function to a normal, exported function wouldn't be worth 
it. I'll have to do some benchmarking first.

cheers,
dalibor topic

[1] http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_4.html#SEC75




More information about the kaffe mailing list