[kaffe] Re: inlining sysdepCallMethod for m68k-linux

Kiyo Inaba inaba at src.ricoh.co.jp
Thu Apr 22 19:00:02 PDT 2004

Dalibor wrote:
>> I made small test program for inline with alloca (list at the bottom),
>> and try to compile it on several platforms including sparc, i686 etc,
>> but all warn 'function using alloca cannot be inline'.
>Yes, even if you use __builtin_alloca on i386, gcc 2.9x seems to warn 
>about alloca. Whereas gcc 3.2 and 3.3.3 has no problems inlining the 
>code, judging by the warnings.

I did not test with gcc 3.2 or 3.3.3, but 3.0.3 also has same problem.

>> So I propose to make sysdepCallMethod for m68k back with macro version.
>I assume that sysdepCallMethod needs to be inlined for some reason, 
>right? If that's the case, then yes, it should be reverted to a macro on 
>the arches that use dynamic array allocation and have a gcc 2.9x.

I am still wondering whether we really need sysdepCallMethod to be
inlined or macro (sorry), but as a matter of fact, if I make this
function not inlined, kaffe does not work ;-<

My understanding is
   A java func makes a call to c native by callMethodA or V (in support.c).
   callMethodA uses sysdepCallMethod.
   In sysdepCallMethod, argument is pushed onto the stack by using alloca.
   Make a real call by inline assembly. (without pushing args)
And this sequence does not require sysdepCallMethod to be inlined. I may
miss some part of this sequence...


More information about the kaffe mailing list