Revision: 3890
Author: [email protected]
Date: Wed Feb 17 06:18:47 2010
Log: Remove a generated mov and jmp.

Remove a move and jump from the fast-path code in the speculative
backend. Ultimately, this code belongs to the bailout and not the
fast path.

Review URL: http://codereview.chromium.org/601094
http://code.google.com/p/v8/source/detail?r=3890

Modified:
 /branches/bleeding_edge/src/arm/fast-codegen-arm.cc
 /branches/bleeding_edge/src/ia32/fast-codegen-ia32.cc
 /branches/bleeding_edge/src/x64/fast-codegen-x64.cc

=======================================
--- /branches/bleeding_edge/src/arm/fast-codegen-arm.cc Thu Feb 11 00:41:19 2010 +++ /branches/bleeding_edge/src/arm/fast-codegen-arm.cc Wed Feb 17 06:18:47 2010
@@ -156,13 +156,9 @@
   } else {
     // Preserve the destination operand in a scratch register in case of
     // bailout.
-    Label done;
     __ mov(scratch0(), destination());
     __ orr(destination(), accumulator1(), Operand(accumulator0()));
-    __ BranchOnSmi(destination(), &done);
-    __ mov(destination(), scratch0());
-    __ jmp(bailout());
-    __ bind(&done);
+    __ BranchOnNotSmi(destination(), bailout());
   }

// If we didn't bailout, the result (in fact, both inputs too) is known to
=======================================
--- /branches/bleeding_edge/src/ia32/fast-codegen-ia32.cc Thu Feb 11 00:41:19 2010 +++ /branches/bleeding_edge/src/ia32/fast-codegen-ia32.cc Wed Feb 17 06:18:47 2010
@@ -165,14 +165,10 @@
   } else {
     // Preserve the destination operand in a scratch register in case of
     // bailout.
-    Label done;
     __ mov(scratch0(), destination());
     __ or_(destination(), Operand(other_accumulator(destination())));
     __ test(destination(), Immediate(kSmiTagMask));
-    __ j(zero, &done, taken);
-    __ mov(destination(), scratch0());
-    __ jmp(bailout());
-    __ bind(&done);
+    __ j(not_zero, bailout(), not_taken);
   }

// If we didn't bailout, the result (in fact, both inputs too) is known to
=======================================
--- /branches/bleeding_edge/src/x64/fast-codegen-x64.cc Thu Feb 11 00:41:19 2010 +++ /branches/bleeding_edge/src/x64/fast-codegen-x64.cc Wed Feb 17 06:18:47 2010
@@ -165,13 +165,9 @@
   } else {
     // Preserve the destination operand in a scratch register in case of
     // bailout.
-    Label done;
     __ movq(scratch0(), destination());
     __ or_(destination(), other_accumulator(destination()));
-    __ JumpIfSmi(destination(), &done);
-    __ movq(destination(), scratch0());
-    __ jmp(bailout());
-    __ bind(&done);
+    __ JumpIfNotSmi(destination(), bailout());
   }


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to