Permalink
Browse files

2002-12-02 root <dietmar@ximian.com>

	* x86.brg (stmt): POP floating point stack correctly

svn path=/trunk/mono/; revision=9344
  • Loading branch information...
1 parent 55236e4 commit ad589ee02efc6ed5d64eda8e3733f06fc6b77705 Dietmar Maurer committed Dec 2, 2002
Showing with 35 additions and 2 deletions.
  1. +4 −0 mono/jit/ChangeLog
  2. +3 −1 mono/jit/x86.brg
  3. +2 −1 mono/tests/Makefile.am
  4. +26 −0 mono/tests/float-pop.cs
View
@@ -1,3 +1,7 @@
+2002-12-02 root <dietmar@ximian.com>
+
+ * x86.brg (stmt): POP floating point stack correctly
+
2002-11-28 Dietmar Maurer <dietmar@ximian.com>
* emit-x86.c (arch_emit_prologue): don't save caller saved
View
@@ -4357,7 +4357,9 @@ freg: NEG (freg) {
x86_fchs (s->code);
}
-stmt: POP (freg)
+stmt: POP (freg) {
+ x86_fstp (s->code, 0);
+}
stmt: STIND_R4 (addr, freg) {
View
@@ -136,7 +136,8 @@ TEST_CS_SRC= \
marshal4.cs \
thread.cs \
thread5.cs \
- thread6.cs
+ thread6.cs \
+ float-pop.cs
TEST_IL_SRC= \
cpblkTest.il \
View
@@ -0,0 +1,26 @@
+using System;
+
+class Test {
+
+ static double test ()
+ {
+ return double.NaN;
+ }
+
+ static int Main()
+ {
+ ulong u = 3960077;
+ ulong f = 1000000;
+
+ for (int i = 0; i < 100; i++)
+ test ();
+
+ double d = u/(double)f;
+
+ if (d != 3.960077)
+ return 1;
+
+ return 0;
+ }
+}
+

0 comments on commit ad589ee

Please sign in to comment.