win87em.dll16: Remove a unnecessary floating point instruction that can cause invalid operation exceptions.
This commit is contained in:
parent
691aa6e267
commit
b0a40dafd9
1 changed files with 0 additions and 3 deletions
|
@ -149,7 +149,6 @@ void WINAPI _fpMath( CONTEXT *context )
|
||||||
case 6: /* round top of stack to integer using method AX & 0x0C00 */
|
case 6: /* round top of stack to integer using method AX & 0x0C00 */
|
||||||
/* returns current controlword */
|
/* returns current controlword */
|
||||||
{
|
{
|
||||||
DWORD dw=0;
|
|
||||||
WORD save,mask;
|
WORD save,mask;
|
||||||
/* I don't know much about asm() programming. This could be
|
/* I don't know much about asm() programming. This could be
|
||||||
* wrong.
|
* wrong.
|
||||||
|
@ -160,10 +159,8 @@ void WINAPI _fpMath( CONTEXT *context )
|
||||||
__asm__ __volatile__("orw $0xC00,%0" : "=m" (mask) : : "memory");
|
__asm__ __volatile__("orw $0xC00,%0" : "=m" (mask) : : "memory");
|
||||||
__asm__ __volatile__("fldcw %0;wait" : : "m" (mask));
|
__asm__ __volatile__("fldcw %0;wait" : : "m" (mask));
|
||||||
__asm__ __volatile__("frndint");
|
__asm__ __volatile__("frndint");
|
||||||
__asm__ __volatile__("fist %0;wait" : "=m" (dw) : : "memory");
|
|
||||||
__asm__ __volatile__("fldcw %0" : : "m" (save));
|
__asm__ __volatile__("fldcw %0" : : "m" (save));
|
||||||
#endif
|
#endif
|
||||||
TRACE("On top of stack is %d\n",dw);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue