cvs commit: src/sys/amd64/amd64 fpu.c

Peter Wemm peter at
Thu Jun 17 21:02:47 PDT 2004

peter       2004-06-18 04:01:54 UTC

  FreeBSD src repository

  Modified files:
    sys/amd64/amd64      fpu.c 
  Try harder to give new processes a clean initial fpu state.  fpu_cleanstate
  wasn't actually clean, it was saving the xmm registers as left over by the
  bios.  fninit() doesn't clear those.
  In fpudna(), instead of doing a fninit() and forgetting to load the initial
  mxcsr, do a full fxrstor(&fpu_cleanstate).  Otherwise we hand over whatever
  random values are left in the xmm registers by the last user.
  I'm not certain of whether this is excessive paranoia or not, but there was
  an outright bug in neglecting to set the mxcsr value that caused awk to
  SIGFPE in some case.  Especially for Tim Robbins. :-)
  i386 probably should do something about the mxcsr setings too.
  Found by:  tjr
  Revision  Changes    Path
  1.154     +5 -7      src/sys/amd64/amd64/fpu.c

More information about the cvs-src mailing list