From: yangguo@chromium.org Date: Fri, 25 Nov 2011 14:26:54 +0000 (+0000) Subject: Shorten FP register pops where possible. X-Git-Tag: upstream/4.7.83~17844 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f8cabc645a61510a6a805cb24efa176eeb3c41f2;p=platform%2Fupstream%2Fv8.git Shorten FP register pops where possible. Review URL: http://codereview.chromium.org/8699004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc index 95ad5e066..a1b0bc70f 100644 --- a/src/ia32/lithium-codegen-ia32.cc +++ b/src/ia32/lithium-codegen-ia32.cc @@ -3756,8 +3756,7 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr) { __ cmp(Operand(input_reg), Immediate(kTooBigExponent)); __ j(less, &convert, Label::kNear); // Pop FPU stack before deoptimizing. - __ ffree(0); - __ fincstp(); + __ fstp(0); DeoptimizeIf(no_condition, instr->environment()); // Reserve space for 64 bit answer. diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc index 2d4f4cdb2..fcae7a2fc 100644 --- a/src/ia32/macro-assembler-ia32.cc +++ b/src/ia32/macro-assembler-ia32.cc @@ -540,8 +540,7 @@ void MacroAssembler::IsInstanceJSObjectType(Register map, void MacroAssembler::FCmp() { if (CpuFeatures::IsSupported(CMOV)) { fucomip(); - ffree(0); - fincstp(); + fstp(0); } else { fucompp(); push(eax); diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc index 5ea6d851c..aa8f47a88 100644 --- a/src/ia32/stub-cache-ia32.cc +++ b/src/ia32/stub-cache-ia32.cc @@ -3392,8 +3392,7 @@ void KeyedLoadStubCompiler::GenerateLoadExternalArray( // If we fail allocation of the HeapNumber, we still have a value on // top of the FPU stack. Remove it. __ bind(&failed_allocation); - __ ffree(); - __ fincstp(); + __ fstp(0); // Fall through to slow case. // Slow case: Jump to runtime. @@ -3710,8 +3709,7 @@ void KeyedLoadStubCompiler::GenerateLoadFastDoubleElement( // A value was pushed on the floating point stack before the allocation, if // the allocation fails it needs to be removed. if (!CpuFeatures::IsSupported(SSE2)) { - __ ffree(); - __ fincstp(); + __ fstp(0); } Handle slow_ic = masm->isolate()->builtins()->KeyedLoadIC_Slow();