2ebdb0ad2126530cbc5e89897229fcc105d5dbfe
1 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
3 #include <crtdll/float.h>
5 unsigned int _controlfp (unsigned int unNew
, unsigned int unMask
)
7 return _control87(unNew
,unMask
);
10 unsigned int _control87 (unsigned int unNew
, unsigned int unMask
)
13 register unsigned int __res
;
14 __asm__
__volatile__ (
15 "pushl %%eax \n\t" /* make room on stack */
19 "andl $0xffff, %%eax \n\t" /* OK; we have the old value ready */
23 "andl %%eax, %%ecx \n\t" /* the bits we want to keep */
26 "andl %1, %%edx \n\t" /* the bits we want to change */
28 "orl %%ecx, %%edx\n\t" /* the new value */
34 :"=r" (__res
):"r" (unNew
),"r" (unMask
): "ax", "dx", "cx");
35 /* :"=a" (__res):"c" (unNew),"d" (unMask):"ax", "dx", "cx"); */