| Index: runtime/vm/intermediate_language_arm.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language_arm.cc (revision 38266)
|
| +++ runtime/vm/intermediate_language_arm.cc (working copy)
|
| @@ -6130,9 +6130,26 @@
|
| }
|
| break;
|
| }
|
| - default:
|
| - UNREACHABLE();
|
| - break;
|
| + case Token::kMUL: {
|
| + // We only support the multiplication of two positive 32-bit integers
|
| + // resulting in a positive 64-bit integer fitting in a mint.
|
| + // We deopt in all other cases.
|
| + // This guarantees that the multiplication of 16-bit unsigned integers,
|
| + // as used in bignum arithmetic, will always succeed.
|
| + if (TargetCPUFeatures::arm_version() == ARMv7) {
|
| + __ orrs(out_hi, left_hi, Operand(right_hi));
|
| + __ b(deopt, NE);
|
| + __ smull(out_lo, out_hi, left_lo, right_lo);
|
| + if (can_overflow()) {
|
| + __ TestImmediate(out_hi, 0xC0000000);
|
| + __ b(deopt, NE);
|
| + }
|
| + } else {
|
| + __ b(deopt);
|
| + }
|
| + break;
|
| + }
|
| + default: UNREACHABLE();
|
| }
|
| if (FLAG_throw_on_javascript_int_overflow) {
|
| EmitJavascriptIntOverflowCheck(compiler, deopt, out_lo, out_hi);
|
|
|