diff options
author | Thilo Schulz <arny@ats.s.bawue.de> | 2011-09-27 14:43:20 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-10 23:38:28 +0000 |
commit | 36154934f5c0472b324f9054bee95af4b9bd94a7 (patch) | |
tree | 428bd45d0ad764da6c5f7e0a749601ded3d02cd0 /src/asm/ftola.asm | |
parent | ed1e20af481fd6fdb5dc8d1dc025586e4bf59129 (diff) |
Set default rounding mode to FE_NEAREST again. Thanks to Matthias Bentrup for providing some explanations.
Diffstat (limited to 'src/asm/ftola.asm')
-rw-r--r-- | src/asm/ftola.asm | 23 |
1 files changed, 10 insertions, 13 deletions
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 |