Subject: Re: hw.machine under COMPAT_NETBSD32?
To: Quentin Garnier <cube@cubidou.net>
From: Eduardo Horvath <eeh@NetBSD.org>
List: tech-kern
Date: 06/16/2005 16:25:48
On Thu, Jun 16, 2005 at 01:19:00AM +0200, Quentin Garnier wrote:

> Would anyone object if I committed the attached patch?  I've made sure
> it is correct for the sparc64 case, and it has to be in the sh5 as
> no value change there.  I can test myself the amd64 case.
> 
> The rationale behind that change is to make the kernel appear exactly
> as its 32-bits counterpart for that sysctl node, as there is no
> valuable interest in giving userland information about the hardware
> it is actually running on:  neither sparc64 nor amd64 in 32-bits mode
> allow any kind of 64-bits extension (which is not the case for 16-bits
> vs. 32-bits on the 80386 processor).

That's also not true for sparc64.  You can execute any 64-bit instruction
on a V9 machine running with the 32-bit address space bit enabled.  In  
fact you should be able to gain quite a bit in performance by using
branch prediction, conditional moves, and block load/stores in 32-bit
code.

You really should make the uname info changeable through a sysctl
if you plan to do that.

Eduardo