This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to add missing PPC instruction
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: degger at fhm dot edu
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Mon, 17 Dec 2001 16:09:53 -0500
- Subject: Re: Patch to add missing PPC instruction
>>>>> degger writes:
degger> the attached patch is supposed to add the the fres instruction
degger> and necessary computation code to the rs6000 backend.
degger> fres is a "floating point single precision reciprocal" mnemonic
degger> which is available on at least the 7400 and 7410 (haven't heard
degger> back from Dale which other CPUs have it, but they can be added later)
degger> which is faster than a single precision divide and spares the storage
degger> for the 1.0, a register and the necessary load instructions to get them
degger> into memory.
degger> This has boostrapped on powerpc-linux-gnu and passed the testsuite
degger> without regressions.
fres is floating-point reciprocal ESTIMATE Single, not a
single-precision reciprocal. It is accurate to one part in either 256 or
4096, not IEEE 754 Single Precision accuracy. It is part of the PowerPC
optional instructions for graphics.
The instruction is meant as an estimate starting point for a
Newton-Raphson approximation algorithm. It does not do what you are
assuming and this patch is rejected.
David