| Index: src/mips/lithium-codegen-mips.cc
|
| diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
|
| index aca6bb36199126681254fe7d98e18cda18767cd6..0f6a6a1a0233b248ccbbdbfee0f4ca78b6a4ae35 100644
|
| --- a/src/mips/lithium-codegen-mips.cc
|
| +++ b/src/mips/lithium-codegen-mips.cc
|
| @@ -3854,10 +3854,11 @@ void LCodeGen::DoPower(LPower* instr) {
|
| Representation exponent_type = instr->hydrogen()->right()->representation();
|
| // Having marked this as a call, we can use any registers.
|
| // Just make sure that the input/output registers are the expected ones.
|
| + Register tagged_exponent = MathPowTaggedDescriptor::exponent();
|
| DCHECK(!instr->right()->IsDoubleRegister() ||
|
| ToDoubleRegister(instr->right()).is(f4));
|
| DCHECK(!instr->right()->IsRegister() ||
|
| - ToRegister(instr->right()).is(a2));
|
| + ToRegister(instr->right()).is(tagged_exponent));
|
| DCHECK(ToDoubleRegister(instr->left()).is(f2));
|
| DCHECK(ToDoubleRegister(instr->result()).is(f0));
|
|
|
| @@ -3866,8 +3867,9 @@ void LCodeGen::DoPower(LPower* instr) {
|
| __ CallStub(&stub);
|
| } else if (exponent_type.IsTagged()) {
|
| Label no_deopt;
|
| - __ JumpIfSmi(a2, &no_deopt);
|
| - __ lw(t3, FieldMemOperand(a2, HeapObject::kMapOffset));
|
| + __ JumpIfSmi(tagged_exponent, &no_deopt);
|
| + DCHECK(!t3.is(tagged_exponent));
|
| + __ lw(t3, FieldMemOperand(tagged_exponent, HeapObject::kMapOffset));
|
| __ LoadRoot(at, Heap::kHeapNumberMapRootIndex);
|
| DeoptimizeIf(ne, instr->environment(), t3, Operand(at));
|
| __ bind(&no_deopt);
|
|
|