| Index: src/arm/code-stubs-arm.cc
|
| ===================================================================
|
| --- src/arm/code-stubs-arm.cc (revision 6012)
|
| +++ src/arm/code-stubs-arm.cc (working copy)
|
| @@ -1229,12 +1229,14 @@
|
| bool generate_code_to_calculate_answer = true;
|
|
|
| if (ShouldGenerateFPCode()) {
|
| - if (runtime_operands_type_ == BinaryOpIC::DEFAULT) {
|
| + // DIV has neither SmiSmi fast code nor specialized slow code.
|
| + // So don't try to patch a DIV Stub.
|
| + if ((runtime_operands_type_ == BinaryOpIC::DEFAULT) &&
|
| + (op_ != Token::DIV)) {
|
| switch (op_) {
|
| case Token::ADD:
|
| case Token::SUB:
|
| case Token::MUL:
|
| - case Token::DIV:
|
| GenerateTypeTransition(masm); // Tail call.
|
| generate_code_to_calculate_answer = false;
|
| break;
|
| @@ -1299,7 +1301,8 @@
|
| // HEAP_NUMBERS stub is slower than GENERIC on a pair of smis.
|
| // r0 is known to be a smi. If r1 is also a smi then switch to GENERIC.
|
| Label r1_is_not_smi;
|
| - if (runtime_operands_type_ == BinaryOpIC::HEAP_NUMBERS) {
|
| + if ((runtime_operands_type_ == BinaryOpIC::HEAP_NUMBERS) &&
|
| + HasSmiSmiFastPath()) {
|
| __ tst(r1, Operand(kSmiTagMask));
|
| __ b(ne, &r1_is_not_smi);
|
| GenerateTypeTransition(masm); // Tail call.
|
|
|