FPSCR is Not Being Saved Across Thread Context SwitchesLast reviewed: August 13, 1997Article ID: Q160670 |
The information in this article applies to:
SYMPTOMSThe FPSCR (Floating Point Status and Control Register) is not being saved during the thread context save/restore procedure. It may cause an invalid floating-point exception mask. NOTE: This problem happens on PowerPC-based computers only.
CAUSEWhen a process has multiple threads, the FPSCR register is not being saved during the thread context save restore procedure. It is being treated as a per process resource rather than a per thread resource. For example: The first thread in a process unmasks a floating point exception, for example divide by zero, and then spawns another thread and waits for it to exit. The other thread unmasks a different exception, for example underflow, and then exits. When the first thread gets scheduled, the FPSCR register is set to underflow being unmasked, but divide by zero being masked. Thus, when the first thread executes, the FPSCR register is set to the state left by the second thread.
STATUSMicrosoft has confirmed this to be a problem in Windows NT version 4.0. This problem was corrected in the latest Microsoft Windows NT 4.0 U.S. Service Pack. For information on obtaining the service pack, query on the following word in the Microsoft Knowledge Base (without the spaces):
S E R V P A C K |
Additional query words: prodnt ppc powerpc Dr Watson
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |