Shorten FP register pops where possible.
authoryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 25 Nov 2011 14:26:54 +0000 (14:26 +0000)
committeryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 25 Nov 2011 14:26:54 +0000 (14:26 +0000)
Review URL: http://codereview.chromium.org/8699004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/ia32/lithium-codegen-ia32.cc
src/ia32/macro-assembler-ia32.cc
src/ia32/stub-cache-ia32.cc

index 95ad5e0665db740cd1260e55a5d5d1312c199ae4..a1b0bc70fce763b0e9e0b1167707c2c93f80ea55 100644 (file)
@@ -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 2d4f4cdb2f551966f55b646299f27c3c014400c9..fcae7a2fcf78c1a4c73efc80998531309cb8bf09 100644 (file)
@@ -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 5ea6d851c1735af826215de16c8e9afd54bfd2b6..aa8f47a880fced25832dfb4feb8270027f3fd943 100644 (file)
@@ -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();