Reviewers: Vyacheslav Egorov,

Description:
Insert three missing FP register stack pop instructions.

We use fstp(0) already in other places. ffree does not pop the stack,
but only marks a FP register as empty.

BUG=v8:2065

Please review this at https://chromiumcodereview.appspot.com/9960066/

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/ia32/code-stubs-ia32.cc


Index: src/ia32/code-stubs-ia32.cc
===================================================================
--- src/ia32/code-stubs-ia32.cc (revision 11250)
+++ src/ia32/code-stubs-ia32.cc (working copy)
@@ -1734,7 +1734,7 @@
         __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
         __ ret(0);
         __ bind(&after_alloc_failure);
-        __ ffree();
+        __ fstp(0);  // Pop FPU stack before calling runtime.
         __ jmp(&call_runtime);
       }

@@ -1957,7 +1957,7 @@
         __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
         __ ret(0);
         __ bind(&after_alloc_failure);
-        __ ffree();
+        __ fstp(0);  // Pop FPU stack before calling runtime.
         __ jmp(&call_runtime);
       }

@@ -2161,8 +2161,8 @@
         __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset));
         __ ret(0);
         __ bind(&after_alloc_failure);
-          __ ffree();
-          __ jmp(&call_runtime);
+        __ fstp(0);  // Pop FPU stack before calling runtime.
+        __ jmp(&call_runtime);
       }
         __ bind(&not_floats);
         break;


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to