This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]