Reviewers: Kevin Millikin,

Description:
Improve count operation in top-level compiler on ARM.

Save one instruction by using stm instead of push.


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

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

Affected files:
   M     src/arm/fast-codegen-arm.cc


Index: src/arm/fast-codegen-arm.cc
===================================================================
--- src/arm/fast-codegen-arm.cc (revision 3530)
+++ src/arm/fast-codegen-arm.cc (working copy)
@@ -1510,14 +1510,13 @@
    }

    // Call runtime for +1/-1.
-  __ push(r0);
-  __ mov(ip, Operand(Smi::FromInt(1)));
-  __ push(ip);
    if (expr->op() == Token::INC) {
-    __ CallRuntime(Runtime::kNumberAdd, 2);
+    __ mov(ip, Operand(Smi::FromInt(1)));
    } else {
-    __ CallRuntime(Runtime::kNumberSub, 2);
+    __ mov(ip, Operand(Smi::FromInt(-1)));
    }
+  __ stm(db_w, sp, ip.bit() | r0.bit());
+  __ CallRuntime(Runtime::kNumberAdd, 2);

    // Store the value returned in r0.
    switch (assign_type) {


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

Reply via email to