1 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
3 #include <msvcrt/float.h>
8 unsigned int _controlfp (unsigned int unNew, unsigned int unMask)
10 return _control87(unNew,unMask);
16 unsigned int _control87 (unsigned int unNew, unsigned int unMask)
18 register unsigned int __res;
20 __asm__ __volatile__ (
21 "pushl %%eax \n\t" /* make room on stack */
25 "andl $0xffff, %%eax \n\t" /* OK; we have the old value ready */
29 "andl %%eax, %%ecx \n\t" /* the bits we want to keep */
32 "andl %1, %%edx \n\t" /* the bits we want to change */
34 "orl %%ecx, %%edx\n\t" /* the new value */
39 :"=r" (__res):"r" (unNew),"r" (unMask): "ax", "dx", "cx");