Re: Intel floating-point initialization

H. Peter Anvin (
19 May 1998 10:36:11 GMT

Followup to: <>
By author: Xavier Leroy <>
In newsgroup:
> I beg to disagree with Linus. The parent process/thread may have set
> the FPU control word to a non-default value (i.e. change rounding
> modes, etc). The programmer legitimely expects the child process to
> inherit those settings (just like it inherits pretty much everything
> else from its parent).

If the FPU registers are otherwise preserved across a system call,
they should be copied by fork(). Otherwise it will not work properly
if you use floating point in the same routine that does a fork()
(remember, to the C compiler, fork() is just another function.)


    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See for web page and full PGP public key
        I am Bahá'í -- ask me about it or see
   "To love another person is to see the face of God." -- Les Misérables

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to