Reviewers: Erik Corry,

Description:
X64: Remove compound smi+overflow test using cmov.

Please review this at http://codereview.chromium.org/165525

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     src/x64/codegen-x64.cc


Index: src/x64/codegen-x64.cc
===================================================================
--- src/x64/codegen-x64.cc      (revision 2686)
+++ src/x64/codegen-x64.cc      (working copy)
@@ -3084,20 +3084,15 @@
                                                    is_increment);
      }

-    Result tmp = allocator_->AllocateWithoutSpilling();
-    ASSERT(kSmiTagMask == 1 && kSmiTag == 0);
-    __ movl(tmp.reg(), Immediate(kSmiTagMask));
-    // Smi test.
      __ movq(kScratchRegister, new_value.reg());
      if (is_increment) {
        __ addl(kScratchRegister, Immediate(Smi::FromInt(1)));
      } else {
        __ subl(kScratchRegister, Immediate(Smi::FromInt(1)));
      }
-    // deferred->Branch(overflow);
-    __ cmovl(overflow, kScratchRegister, tmp.reg());
-    __ testl(kScratchRegister, tmp.reg());
-    tmp.Unuse();
+    // Smi test.
+    deferred->Branch(overflow);
+    __ testl(kScratchRegister, Immediate(kSmiTagMask));
      deferred->Branch(not_zero);
      __ movq(new_value.reg(), kScratchRegister);




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

Reply via email to