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
This commit is contained in:
yangguo@chromium.org 2011-11-25 14:26:54 +00:00
parent d542a2fb75
commit f8cabc645a
3 changed files with 4 additions and 8 deletions

View File

@ -3756,8 +3756,7 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr) {
__ cmp(Operand(input_reg), Immediate(kTooBigExponent)); __ cmp(Operand(input_reg), Immediate(kTooBigExponent));
__ j(less, &convert, Label::kNear); __ j(less, &convert, Label::kNear);
// Pop FPU stack before deoptimizing. // Pop FPU stack before deoptimizing.
__ ffree(0); __ fstp(0);
__ fincstp();
DeoptimizeIf(no_condition, instr->environment()); DeoptimizeIf(no_condition, instr->environment());
// Reserve space for 64 bit answer. // Reserve space for 64 bit answer.

View File

@ -540,8 +540,7 @@ void MacroAssembler::IsInstanceJSObjectType(Register map,
void MacroAssembler::FCmp() { void MacroAssembler::FCmp() {
if (CpuFeatures::IsSupported(CMOV)) { if (CpuFeatures::IsSupported(CMOV)) {
fucomip(); fucomip();
ffree(0); fstp(0);
fincstp();
} else { } else {
fucompp(); fucompp();
push(eax); push(eax);

View File

@ -3392,8 +3392,7 @@ void KeyedLoadStubCompiler::GenerateLoadExternalArray(
// If we fail allocation of the HeapNumber, we still have a value on // If we fail allocation of the HeapNumber, we still have a value on
// top of the FPU stack. Remove it. // top of the FPU stack. Remove it.
__ bind(&failed_allocation); __ bind(&failed_allocation);
__ ffree(); __ fstp(0);
__ fincstp();
// Fall through to slow case. // Fall through to slow case.
// Slow case: Jump to runtime. // 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 // A value was pushed on the floating point stack before the allocation, if
// the allocation fails it needs to be removed. // the allocation fails it needs to be removed.
if (!CpuFeatures::IsSupported(SSE2)) { if (!CpuFeatures::IsSupported(SSE2)) {
__ ffree(); __ fstp(0);
__ fincstp();
} }
Handle<Code> slow_ic = Handle<Code> slow_ic =
masm->isolate()->builtins()->KeyedLoadIC_Slow(); masm->isolate()->builtins()->KeyedLoadIC_Slow();