Subject: Re: port MIPS64
To: None <binary.chen@gmail.com>
From: Paul Koning <pkoning@equallogic.com>
List: port-mips
Date: 05/12/2006 13:53:23
>>>>> "Bin" == Bin Chen <binary.chen@gmail.com> writes:

 Bin> If the userland program matters, how did the other 64bit project
 Bin> do?  Such as Alpha 64, as claimed by NetBSD official
 Bin> support. Can we borrow the code done by Alpha64?

No.  The issue is that the MIPS ABI (in all its flavors) has rules for
how arguments are passed, what the stack looks like, etc.  Those are
specific to MIPS.  There's library code that implements those rules.
Alpha has rules like that too, but they are different rules.

For example, setjmp has to save enough state that longjmp can come
back to that point.  What that state looks like is basically defined
by the calling standard (stack layout and register save rules).  The
MIPS O32 ABI has one set of rules -- that's what NetBSD/MIPS does
now.  The N32 and N64 ABIs are quite different.  (It turns out the
hard part is the "N" part, not the 32 vs. 64 part...)

Similarly, syscalls look a lot like function calls, with some truly
warped tweaks to make things interesting.  So when you pick a
different calling standard, you need to make matching adjustments to
how syscall() is done.

    paul