*BSD News Article 5311


Return to BSD News archive

Path: sserve!manuel!munnari.oz.au!uunet!mcsun!fuug!news.funet.fi!hydra!klaava!torvalds
From: torvalds@klaava.Helsinki.FI (Linus Torvalds)
Newsgroups: comp.unix.bsd
Subject: Re: Help with math emulator!!!
Message-ID: <1992Sep20.082035.19305@klaava.Helsinki.FI>
Date: 20 Sep 92 08:20:35 GMT
References: <19c1e4INN81h@agate.berkeley.edu>
Organization: University of Helsinki
Lines: 25

In article <19c1e4INN81h@agate.berkeley.edu> randyc@soda.berkeley.edu (Yen-Pang Randy Chou) writes:
>
>I was trying to compile vogl(emulates an sgi on X), and ran into the following
>error message when I tried running one of the sample files :
>
>math_emulate: instruction d9ff not implemented

0xd9ff is the code for "fcos", which is indeed not handled by the
emulator (along with all the other trigonometric/logarithmic functions). 
The math emulator only handles those instructions which gcc normally
generates (loads/stores/add/sub/mul/div/cmp and state save/restore).  I
don't think the bsd emulator even contains the fsqrt code which I added
later for linux (as gcc-2.x can generate that too). 

>does anyone know how to fix that?  I tried both the original libm.a and the
>new libcfpu.a and they both gave me the same error message.  Would it help
>if I had a 486?  BTW, has anyone gotten vogl to work?

A math chip (387 or a full 486) would certainly help, as the emulator
isn't needed then.  Another fix is to use a soft-float library, which
does the library functions (that the emulator doesn't handle) by doing
the correct series of simpler functions.  I don't know if/where such a
library can be found for 386bsd. 

		Linus