| Index: src/a64/lithium-a64.cc
|
| diff --git a/src/a64/lithium-a64.cc b/src/a64/lithium-a64.cc
|
| index ce36c02925c262e92bc83a6fb039a08fe6ba129a..efc35f83e73f7ccccd8d3fa4d5eb6b0bedab60d7 100644
|
| --- a/src/a64/lithium-a64.cc
|
| +++ b/src/a64/lithium-a64.cc
|
| @@ -1132,21 +1132,20 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
|
|
| LNumberTagD* result = new(zone()) LNumberTagD(value, temp1, temp2);
|
| return AssignPointerMap(DefineAsRegister(result));
|
| - } else if (to.IsSmi()) {
|
| - // TODO(all): Split LDoubleToSmi into two instructions.
|
| - LOperand* value = UseRegister(instr->value());
|
| - LOperand* temp1 = instr->CanTruncateToInt32() ? TempRegister() : NULL;
|
| - LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister() : NULL;
|
| - LDoubleToSmi* result = new(zone()) LDoubleToSmi(value, temp1, temp2);
|
| - return AssignEnvironment(DefineAsRegister(result));
|
| } else {
|
| - // TODO(all): Split LDoubleToI into two instructions, truncating and not.
|
| - ASSERT(to.IsInteger32());
|
| + ASSERT(to.IsSmi() || to.IsInteger32());
|
| LOperand* value = UseRegister(instr->value());
|
| - LOperand* temp1 = instr->CanTruncateToInt32() ? TempRegister() : NULL;
|
| - LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister() : NULL;
|
| - LDoubleToI* result = new(zone()) LDoubleToI(value, temp1, temp2);
|
| - return AssignEnvironment(DefineAsRegister(result));
|
| +
|
| + if (instr->CanTruncateToInt32()) {
|
| + LOperand* temp1 = TempRegister();
|
| + LOperand* temp2 = TempRegister();
|
| + LTruncateDoubleToIntOrSmi* result =
|
| + new(zone()) LTruncateDoubleToIntOrSmi(value, temp1, temp2);
|
| + return DefineAsRegister(result);
|
| + } else {
|
| + LDoubleToIntOrSmi* result = new(zone()) LDoubleToIntOrSmi(value);
|
| + return AssignEnvironment(DefineAsRegister(result));
|
| + }
|
| }
|
| } else if (from.IsInteger32()) {
|
| info()->MarkAsDeferredCalling();
|
|
|