From 36154934f5c0472b324f9054bee95af4b9bd94a7 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Tue, 27 Sep 2011 14:43:20 +0000 Subject: Set default rounding mode to FE_NEAREST again. Thanks to Matthias Bentrup for providing some explanations. --- src/asm/ftola.asm | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'src/asm/ftola.asm') diff --git a/src/asm/ftola.asm b/src/asm/ftola.asm index 370c12d8..eea9d0e3 100644 --- a/src/asm/ftola.asm +++ b/src/asm/ftola.asm @@ -25,11 +25,11 @@ IFNDEF idx64 .model flat, c ENDIF -; .data +.data -; ifndef idx64 -; fpucw WORD 0F7Fh -; endif +ifndef idx64 + fpucw WORD 0F7Fh +endif .code @@ -51,22 +51,19 @@ ELSE ; qftol using FPU qftolx87m macro src -; not necessary, fpucw is set with _controlfp at startup -; sub esp, 2 -; fnstcw word ptr [esp] -; fldcw fpucw + sub esp, 2 + fnstcw word ptr [esp] + fldcw fpucw fld dword ptr src fistp dword ptr src -; fldcw [esp] + fldcw [esp] mov eax, src -; add esp, 2 + add esp, 2 ret endm qftolx87 PROC -; need this line when storing FPU control word on stack -; qftolx87m [esp + 6] - qftolx87m [esp + 4] + qftolx87m [esp + 6] qftolx87 ENDP qvmftolx87 PROC -- cgit