m68k calling conventions

Godmar Back gback at cs.utah.edu
Wed Mar 31 10:32:29 PST 1999

> Kaffe's calling convention is NOT compatible with the standard C calling
> convention, because Kaffe does not respect callee-save registers.  Rather,
> Kaffe assumes that all registers will be clobbered after a call to a function.
> For this reason, Kaffe cannot directly interwork with C functions.  If it could,
> then this sysdepCallMethod stuff likely wouldn't be needed at all.

Here's a quick question:
why do you have to respect callee-save registers?

And why can Kaffe not directly interwork with C functions?
I'd actually claim it can: because that's how functions such as
java_lang_Object_wait0 are invoked.

Note further that Kaffe treats all registers as caller-saved because
it needs to be able to restore the values from the stack if the
function called caused an exception.

	- Godmar

More information about the kaffe mailing list