Subject: N32
To: None <port-mips@netbsd.org>
From: Emmanuel Dreyfus <manu@netbsd.org>
List: port-mips
Date: 01/03/2002 23:30:33
After matching N32 binaries, next step is getting argument to system
calls correctly handled. One of the differencies is that in N32 mode,
registers are 64 bit long. Building different trap frames for o32 and
n32 would be rather difficult, so a good option is to change the current
trapframe to use 64 bit slots for registers on both o32 and n32. In o32,
only 32 bits out of the 64 bit slot would be used, and in n32/n64, the
64 bits would be used.

This modification is done by defining mips_reg_t as 64 bits.

It seems that setting mips_reg_t to 64 bits has no side effect on NetBSD
native binaries. I've made performance measures for a few system calls,
and I don't see any difference before and after.

So modifying sys/arch/mips/include/types.h so that mips_reg_t is always
long long seems reasonnable to me, since this will work with no overhead
for o32, n32 and n64. I think about removing alls the #if on
_MIPS_BSD_API and just do typedef long long mips_reg_t

Is this reasonable?

-- 
Emmanuel Dreyfus.  
Pas de processeur Intel, pas de logiciels Microsoft:
Des programmes sains dans un ordinateur sain.
manu@netbsd.org