Reviewers: ulan,
Message:
PTAL. Local tests look good.
Description:
Shorten FP register pops where possible.
Please review this at http://codereview.chromium.org/8699004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/ia32/lithium-codegen-ia32.cc
M src/ia32/macro-assembler-ia32.cc
M src/ia32/stub-cache-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
95ad5e0665db740cd1260e55a5d5d1312c199ae4..a1b0bc70fce763b0e9e0b1167707c2c93f80ea55
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.
Index: src/ia32/macro-assembler-ia32.cc
diff --git a/src/ia32/macro-assembler-ia32.cc
b/src/ia32/macro-assembler-ia32.cc
index
2d4f4cdb2f551966f55b646299f27c3c014400c9..fcae7a2fcf78c1a4c73efc80998531309cb8bf09
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);
Index: src/ia32/stub-cache-ia32.cc
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index
5ea6d851c1735af826215de16c8e9afd54bfd2b6..aa8f47a880fced25832dfb4feb8270027f3fd943
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<Code> slow_ic =
masm->isolate()->builtins()->KeyedLoadIC_Slow();
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev