Subject: Re: How much of the Intel instruction set do we use?
To: Brian Stark <bstark@siemens-psc.com>
From: Frank van der Linden <frank@wins.uva.nl>
List: port-i386
Date: 04/01/1998 23:35:16
On Wed, Apr 01, 1998 at 01:25:15PM -0600, Brian Stark wrote:
> Hello,
> 
> 
> To what extent does NetBSD/i386 take advantage of the differences among
> the available CPU types? I know about the different kernel configuration
> options for the different CPU types, but if I build a kernel for a Pentium
> system, is it really going to be that much better than say a kernel built
> for a 386?

There are differences, some low level routines have been tailored towards
certain types of CPUs, but not much.
> 
> I would like to know that when a new version of an Intel CPU comes out,
> are there people that look at the new features in the CPU and then try to
> take advantage of those features in the NetBSD source code? 

Of course new features are looked at, but more could be done to optimize
for specific features. I wouldn't expect any miracles ("Quake benchmarks"
don't apply here), but optimizations are certainly possible. It's just
not been done until now.
> 
> For example, lately, Intel has been advertising the Pentium with MMX
> technology. Does NetBSD take advantage of the new instructions on systems
> with a Pentium with MMX?

Nope. This has 2 reasons: 1) gcc doesn't output MMX instructions (I haven't
checked 2.8 or egcs lately), 2) MMX is nothing more but a hack to use
the FP registers for some operations to get a little more speed. It is
said that Intel was pressurized into doing this hack by Microsoft.
MMX could be used in copy operations, but this is already a known
mechanism: use the FP registers to make bcopy operations faster. Nothing
new there. I would hardly call MMX a "technology" at all. Basically
it's a set of instructions to use the FP registers as 64 bit integers.
Yes, you're really using the FP registers, so be careful when mixing
float operations and MMX.

- Frank