Revision: 3531 Author: [email protected] Date: Mon Jan 4 06:15:47 2010 Log: Improve count operation in top-level compiler on ARM.
Save one instruction by using stm instead of push. Review URL: http://codereview.chromium.org/517027 http://code.google.com/p/v8/source/detail?r=3531 Modified: /branches/bleeding_edge/src/arm/fast-codegen-arm.cc ======================================= --- /branches/bleeding_edge/src/arm/fast-codegen-arm.cc Mon Jan 4 05:56:31 2010 +++ /branches/bleeding_edge/src/arm/fast-codegen-arm.cc Mon Jan 4 06:15:47 2010 @@ -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
