Reviewers: mvstanton,

Description:
Fix number tag for no-sse2.

FCmp() pops 2 arguments from the stack...

BUG=

Please review this at https://codereview.chromium.org/18254007/

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

Affected files:
  M src/ia32/lithium-codegen-ia32.cc


Index: src/ia32/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc index 4e728cd55f545d040b93e3cab25957dc9296a4ac..5176b38453bb7355fa3caf1a6b0691111ee6df73 100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -5070,6 +5070,7 @@ void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
       __ ucomisd(input_reg, input_reg);
     } else {
       __ fld(0);
+      __ fld(0);
       __ FCmp();
     }

@@ -5116,16 +5117,12 @@ void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
     __ jmp(deferred->entry());
   }
   __ bind(deferred->exit());
-  if (CpuFeatures::IsSupported(SSE2)) {
+  if (use_sse2) {
     CpuFeatureScope scope(masm(), SSE2);
     XMMRegister input_reg = ToDoubleRegister(instr->value());
     __ movdbl(FieldOperand(reg, HeapNumber::kValueOffset), input_reg);
   } else {
-    __ fst_d(FieldOperand(reg, HeapNumber::kValueOffset));
-  }
-  if (!use_sse2) {
-    // clean up the stack
-    __ fstp(0);
+    __ fstp_d(FieldOperand(reg, HeapNumber::kValueOffset));
   }
   __ bind(&done);
 }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to