http://codereview.chromium.org/6331005/diff/1/src/arm/lithium-codegen-arm.cc File src/arm/lithium-codegen-arm.cc (right):
http://codereview.chromium.org/6331005/diff/1/src/arm/lithium-codegen-arm.cc#newcode1041 src/arm/lithium-codegen-arm.cc:1041: // Try a few common cases before using the generic stub. Maybe extend this comment a bit (it took me some time to find out that you where subtracting left 0 - 2 times from right). http://codereview.chromium.org/6331005/diff/1/src/arm/lithium-codegen-arm.cc#newcode1049 src/arm/lithium-codegen-arm.cc:1049: if (i < kUnfolds - 1) __ sub(scratch, left, right); Shouldn't this be __ sub(scratch, scratch, right, SetCC) ? Or maybe not, but when le is set will scratch not be negative (for positive left/right)? http://codereview.chromium.org/6331005/diff/1/src/arm/lithium-codegen-arm.cc#newcode1052 src/arm/lithium-codegen-arm.cc:1052: // Check for power of two on the right hand side. I think the code we have in GenericBinaryOpStub does this in fewer instructions. It works on smis but should work for int32 as well. // Check for two positive smis. __ orr(smi_test_reg, lhs, Operand(rhs)); __ tst(smi_test_reg, Operand(0x80000000u | kSmiTagMask)); __ b(ne, &slow); // Check that rhs is a power of two and not zero. Register mask_bits = r3; __ sub(scratch, rhs, Operand(1), SetCC); __ b(mi, &slow); __ and_(mask_bits, rhs, Operand(scratch), SetCC); __ b(ne, ¬_power_of_2); // Calculate power of two modulus. __ and_(result, lhs, Operand(scratch)); http://codereview.chromium.org/6331005/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
