cvs commit: src/sys/amd64/include ieeefp.h

Bruce Evans bde at FreeBSD.org
Fri Jan 11 09:11:32 PST 2008


bde         2008-01-11 17:11:32 UTC

  FreeBSD src repository

  Modified files:
    sys/amd64/include    ieeefp.h 
  Log:
  Fix fpset*() to not trap if there is a currently unmasked exception.
  Unmasked exceptions (which can be fixed up using fpset*() before they
  trap) are very rare, especially on amd64 since SSE exceptions trap
  synchronously, but I want to merge the faster amd64 implementations of
  fpset*() back to i386 without introducing the bug on i386.
  
  The i386 implementation has always avoided the trap automatically by
  changing things using load/store of the FP environment, but this is
  very slow.  Most changes only affect the control word, so they can
  usually be done much more efficiently, and amd64 has always done this,
  but loading the control word can trap.
  
  This version use the fast method only in the usual case where it will
  not trap.  This only costs a couple of integer instructions (including
  one branch which I haven't optimized carefully yet) in the usual case,
  but bloats the inlines a lot.  The inlines were already a bit too large
  to handle both the FPU and SSE.
  
  Revision  Changes    Path
  1.19      +42 -12    src/sys/amd64/include/ieeefp.h


More information about the cvs-src mailing list