Don't use _FPU_GETCW if it won't do what we want

- _FPU_GETCW is defined for more than just x87. Don't use it if the
  control word for the target architecture doesn't support _FPU_EXTENDED
  or _FPU_DOUBLE defined, e.g. pretty much anything but x87. If I had been
  using glibc on PowerPC instead of Apple's libc, I probably would have
  noticed this sooner, since _FPU_GETCW is part of glibc.
This commit is contained in:
Randy Heit 2016-03-08 22:00:16 -06:00
parent 76489e7638
commit 03118d441f

View file

@ -1973,7 +1973,7 @@ static void D_DoomInit()
// Set the FPU precision to 53 significant bits. This is the default // Set the FPU precision to 53 significant bits. This is the default
// for Visual C++, but not for GCC, so some slight math variances // for Visual C++, but not for GCC, so some slight math variances
// might crop up if we leave it alone. // might crop up if we leave it alone.
#if defined(_FPU_GETCW) #if defined(_FPU_GETCW) && defined(_FPU_EXTENDED) && defined(_FPU_DOUBLE)
{ {
int cw; int cw;
_FPU_GETCW(cw); _FPU_GETCW(cw);