Subject: Re: ARM ELF toolchain patches
To: Dave Daniels <dave_daniels@argonet.co.uk>
From: Peter Teichmann <teich-p@rcs.urz.tu-dresden.de>
List: port-arm32
Date: 02/27/2001 21:32:30
Dave Daniels wrote:
> In article <E14Xheb-0007Y8-00@chiark.greenend.org.uk>,
>    Ben Harris <bjh21@netbsd.org> wrote:
> > Did you compile it with -mhard-float?  Did you recompile libc (and li=
bm)
> > with -mhard-float as well?
>=20
> I have tried compiling just the interpreter with -mhard-float and
> that has done the trick! My test program now runs in 82 seconds
> and so is clearly using the floating point hardware for the basic
> arithmetic operators. Unfortunately it is not all good news as
> 'PRINT COS(PI)' returns the result 3.14159265 and not -1. COS is
> not the only function that returns the wrong result.

The reason might be that there are instructions like SIN/COS/TAN/LOG/EXP
defined in the ARM floating point instruction set, but they have never be=
en
implemented in hardware, and have to be emulated even if there is a FPA
present. (ARM does not recommend to use them anymore, as calling a functi=
on is
cheaper than handling an exception and parsing the opcodes)

It might be that -mhard-float makes use of these instructions, and probab=
ly
there is no FP emulator emulating them.

Peter Teichmann
--=20
Email: teich-p@rcs.urz.tu-dresden.de   WWW: rcswww.urz.tu-dresden.de/~tei=
ch-p