| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index 1230cb32e78d8055a2d2abc5915dd78d40f01e5d..5d72524cfe14f368dfefa8d67678c2a8cc5c3ea7 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -3725,9 +3725,14 @@ void LCodeGen::DoMathRound(LMathRound* instr) {
|
|
|
|
|
| void LCodeGen::DoMathSqrt(LMathSqrt* instr) {
|
| - XMMRegister input_reg = ToDoubleRegister(instr->value());
|
| - ASSERT(ToDoubleRegister(instr->result()).is(input_reg));
|
| - __ sqrtsd(input_reg, input_reg);
|
| + XMMRegister output = ToDoubleRegister(instr->result());
|
| + if (instr->value()->IsDoubleRegister()) {
|
| + XMMRegister input = ToDoubleRegister(instr->value());
|
| + __ sqrtsd(output, input);
|
| + } else {
|
| + Operand input = ToOperand(instr->value());
|
| + __ sqrtsd(output, input);
|
| + }
|
| }
|
|
|
|
|
|
|