config/parisc/common.h

Pavel.Roskin at ecsoft.co.uk Pavel.Roskin at ecsoft.co.uk
Wed Aug 26 11:21:07 PDT 1998




Hello!

My comment about __builtin_alloca is not quite correct, but the situation
on HP-UX is actually following:
1) Space on stack is allocated with 64-byte granularity
2) Extra arguments (which don't fit to registers) are stored in the
_allocated_ part of stack. Stack pointer is not changed before call.
3) If a function calls another function with many arguments, gcc generates
code allocating more space on stack.
4) If sysdepCallMethod must pass many arguments, some of them may overwrite
local variables.
5) CALL->nrargs is always less than 9. Space on stack is enough to store 4
arguments. But what if Kaffe executes a call with 20 arguments? It has
never been tested.
6) __builtin_alloca (not alloca to make sure that this is not a library
function) moves stack pointer, and makes it safe to write more arguments in
stack.
7) It is also possible to declare an array which is not used. It must be
declared after all other variables. But where is the garantee that gcc will
not remove it as unnecessary if optimization is turned on?
Anyway, it seems that this problem has never emerged. Maybe, some test
should be written. By the way, there is no test for JNI in the regression
tests (as far as I understand).

Pavel Roskin <pavel.roskin at ecsoft.co.uk>




More information about the kaffe mailing list