Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 03d50676fb652e30a00e4f374c8af786e791de96..50544dea4347669f9857fac8fab5e6d0902122f8 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -4073,7 +4073,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
// Call stub. Undo operation first. |
__ sub(r0, r0, Operand(Smi::FromInt(count_value))); |
} |
- __ mov(r1, Operand(Smi::FromInt(count_value))); |
+ __ mov(r1, r0); |
+ __ mov(r0, Operand(Smi::FromInt(count_value))); |
// Record position before stub call. |
SetSourcePosition(expr->position()); |
@@ -4298,29 +4299,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { |
default: { |
VisitForAccumulatorValue(expr->right()); |
- Condition cond = eq; |
- switch (op) { |
- case Token::EQ_STRICT: |
- case Token::EQ: |
- cond = eq; |
- break; |
- case Token::LT: |
- cond = lt; |
- break; |
- case Token::GT: |
- cond = gt; |
- break; |
- case Token::LTE: |
- cond = le; |
- break; |
- case Token::GTE: |
- cond = ge; |
- break; |
- case Token::IN: |
- case Token::INSTANCEOF: |
- default: |
- UNREACHABLE(); |
- } |
+ Condition cond = CompareIC::ComputeCondition(op); |
__ pop(r1); |
bool inline_smi_code = ShouldInlineSmiCase(op); |