[ros-diffs] [gdalsnes] 17260: fix horribly broken ftol. this fixes abiword 2.0.3

gdalsnes at svn.reactos.com gdalsnes at svn.reactos.com
Wed Aug 10 19:48:28 CEST 2005


fix horribly broken ftol. this fixes abiword 2.0.3
Modified: trunk/reactos/lib/rtl/i386/math.S
  _____  

Modified: trunk/reactos/lib/rtl/i386/math.S
--- trunk/reactos/lib/rtl/i386/math.S	2005-08-10 17:19:13 UTC (rev
17259)
+++ trunk/reactos/lib/rtl/i386/math.S	2005-08-10 17:48:13 UTC (rev
17260)
@@ -204,6 +204,11 @@

 	
 .intel_syntax noprefix
 
+/*
+ * This routine is called by MSVC-generated code to convert from
floating point
+ * to integer representation. The floating point number to be converted
is
+ * on the top of the floating point stack.
+ */
 __ftol:
     /* Set up stack frame */
     push ebp
@@ -214,10 +219,11 @@
     wait
     mov ax, [ebp-2]
     or ah, 0xC
+    mov [ebp-4], ax
     fldcw [ebp-4]
     
     /* Do the conversion */
-    fistp qword ptr [ebp-8]
+    fistp qword ptr [ebp-12]
     
     /* Restore rounding mode */
     fldcw [ebp-2]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050810/e396397c/attachment.html


More information about the Ros-diffs mailing list