Make function BX=6 round ST0 to integer.
This commit is contained in:
parent
73cc3ba131
commit
3209a0e6d1
|
@ -61,6 +61,15 @@ void WINAPI WIN87_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;
|
||||||
|
/* I don't know much about asm() programming. This could be
|
||||||
|
* wrong.
|
||||||
|
*/
|
||||||
|
__asm__ __volatile__("frndint");
|
||||||
|
__asm__ __volatile__("fist %0;wait" : "=m" (dw) : : "memory");
|
||||||
|
TRACE(int,"On top of stack is %ld\n",dw);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7: /* POP top of stack as integer into DX:AX */
|
case 7: /* POP top of stack as integer into DX:AX */
|
||||||
|
@ -98,6 +107,7 @@ void WINAPI WIN87_fpmath( CONTEXT *context )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* error. Say that loud and clear */
|
default: /* error. Say that loud and clear */
|
||||||
|
FIXME(int,"unhandled switch %d\n",BX_reg(context));
|
||||||
AX_reg(context) = DX_reg(context) = 0xFFFF;
|
AX_reg(context) = DX_reg(context) = 0xFFFF;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue