Re: Floating point in kernel

From: Marc Lehmann (pcg@goof.com)
Date: Fri May 05 2000 - 16:49:17 EST


On Wed, May 03, 2000 at 09:54:01PM +0000, David Wragg <dpw@doc.ic.ac.uk> wrote:
> It's actually possible to compile this to code that doesn't use FP
> instructions. To do the trick with three instructions on x86:
>
> However, I don't know of any version of gcc/egcs which performs this
> optimization

A C compiler couldn't do this transformation since your code gives
different results (and would thus be incorrect). It is up to the
programmer to decide wether the error is small enough to warrant slightly
"incorrect" results.

The transformation could be made to work in some cases, however.

-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       pcg@opengroup.org |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:18 EST