From: olivf@chromium.org Date: Fri, 12 Jul 2013 13:05:39 +0000 (+0000) Subject: Fix number tag for no-sse2. X-Git-Tag: upstream/4.7.83~13388 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=da7f6a68aaea0c8503c50514687a682e9918cbbd;p=platform%2Fupstream%2Fv8.git Fix number tag for no-sse2. FCmp() pops 2 arguments from the stack... BUG= R=mvstanton@chromium.org Review URL: https://codereview.chromium.org/18254007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc index 9a49e16..46d0c1f 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); }