Subject: Re: new sysctl: hw.cpu_isa
To: Ignatios Souvatzis <>
From: Ben Harris <>
List: tech-kern
Date: 11/15/2000 16:21:45
On Wed, 15 Nov 2000, Ignatios Souvatzis wrote:

> On Wed, Nov 15, 2000 at 03:31:20PM +0000, Ben Harris wrote:
> > Sounds fine to me.  I suppose if userland wants to know if a given
> > instruction is available through emulation, they can always execute it and
> > see if they get a SIGILL... *grin*
> You don't get any. It's just sloooooow. For an occainal instruction or two
> thats fine, but you want to avoid it for heavy usage.

Erm I meant (in pseudocode):

if (sysctl(hw.isa) >= armv2a)
    /* SWP is in hardware */
else if (executing SWP seems to work)
    /* SWP is emulated in software */
else /* SWP generated a SIGILL */
    /* SWP isn't available at all */

Ben Harris                                                   <>
Portmaster, NetBSD/arm26               <URL:>