Subject: Re: libm and i387-specific routines
To: None <daw@panix.com>
From: Mike Long <mike.long@analog.com>
List: port-i386
Date: 01/21/1997 13:15:59
>From: daw@panix.com (Nathaniel D. Daw)
>Date: 21 Jan 1997 11:39:47 -0500
>
>Mike Long <mike.long@analog.com> writes:
>
>[my complaining about having to edit /usr/src/lib/libm/Makefile to
>take advantage of my FPU deleted]
>
>> AFAIK, the problem isn't that i386s will run code using the full range
>> of FPU instructions slowly, but that they won't run it at all.  The
>> reason is that the FPU emulator is lacking.
>
>In spite of this, I would argue that technology marches on and the
>default at this point should be to assume an FPU. I just hate having
>to remember to uncomment that Makefile section every time I build the
>world. And it always makes me wonder what performance I'm losing
>elsewhere by not making undocumented edits to randomly placed source
>files elsewhere. If these kind of decisions come up elsewhere in
>userland, perhaps there should be a centralized config-style process
>for configuring your userland build as well as your kernel. Ideas?

As long as we claim to support machines with 386 and 486SX CPUs (and
no one fixes the FPU emulator), we have to ship a version of libm that
works for those CPUs.  That means not using the more esoteric FPU
instructions.

However, it should be simple enough to make the choice depend on
whether a certain variable is set; see PR port-i386/2433 for one idea.
i386 users with FPUs could easily set the variable in /etc/mk.conf.

Note that gcc is affected as well; see the top of
src/gnu/usr.bin/gcc/arch/i386/netbsd.h.

Another area which could use similar customization support is the
timezone selection in src/etc/Makefile and
src/share/zoneinfo/Makefile.
-- 
Mike Long <mike.long@analog.com>     <URL:http://www.shore.net/~mikel>
VLSI Design Engineer         finger mikel@shore.net for PGP public key
Analog Devices, CPD Division          CCBF225E7D3F7ECB2C8F7ABB15D9BE7B
Norwood, MA 02062 USA       (eq (opinion 'ADI) (opinion 'mike)) -> nil