I tried to rebuild the m68k port last night, after Kiyo's merging.

First, I got some errors due to minor changes in the assembler syntax.  I notice
that some of the inline assembler code was changed to assemble under Linux.
Why should the assembler syntax be different between Linux and NetBSD?
Both systems use GAS, so the syntax will be the same.

I will experiment with different syntaxes, to try to find one that works on
both NetBSD and Linux.  We are only asking for trouble if we have two versions
of each assembly routine that differ only in their syntax.  I may be able to
get access to a Linux/m68k system to test this.

Second, there appears to be a difference in the calling conventions between
NetBSD and Linux in that a floating-point quantity is returned in d0/d1 on
NetBSD but fp0 on Linux.  Again, why?

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.

Since we are not compatible with the C calling convention, we are free to use
whatever convention we want.  It makes sense to me in this case to use the
same conventions on NetBSD as on Linux.  To do otherwise simply creates
unnecessary OS dependencies.

Does anyone have any comments on this before I expend a lot of effort to
make the code as simple as possible?

Reply via email to