| Index: src/arm64/lithium-arm64.cc
 | 
| diff --git a/src/arm64/lithium-arm64.cc b/src/arm64/lithium-arm64.cc
 | 
| index 812fe12e58aa67a69d0e23a48712404d350f99d4..c1243b8398939a46acba9241e480edaedebd5ced 100644
 | 
| --- a/src/arm64/lithium-arm64.cc
 | 
| +++ b/src/arm64/lithium-arm64.cc
 | 
| @@ -2466,14 +2466,16 @@ LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
 | 
|        return DefineAsRegister(result);
 | 
|      }
 | 
|      case kMathFloor: {
 | 
| -      ASSERT(instr->representation().IsInteger32());
 | 
|        ASSERT(instr->value()->representation().IsDouble());
 | 
| -      // TODO(jbramley): ARM64 can easily handle a double argument with frintm,
 | 
| -      // but we're never asked for it here. At the moment, we fall back to the
 | 
| -      // runtime if the result doesn't fit, like the other architectures.
 | 
|        LOperand* input = UseRegisterAtStart(instr->value());
 | 
| -      LMathFloor* result = new(zone()) LMathFloor(input);
 | 
| -      return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
 | 
| +      if (instr->representation().IsInteger32()) {
 | 
| +        LMathFloorI* result = new(zone()) LMathFloorI(input);
 | 
| +        return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
 | 
| +      } else {
 | 
| +        ASSERT(instr->representation().IsDouble());
 | 
| +        LMathFloorD* result = new(zone()) LMathFloorD(input);
 | 
| +        return DefineAsRegister(result);
 | 
| +      }
 | 
|      }
 | 
|      case kMathLog: {
 | 
|        ASSERT(instr->representation().IsDouble());
 | 
| @@ -2489,14 +2491,17 @@ LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
 | 
|        return DefineAsRegister(new(zone()) LMathPowHalf(input));
 | 
|      }
 | 
|      case kMathRound: {
 | 
| -      ASSERT(instr->representation().IsInteger32());
 | 
|        ASSERT(instr->value()->representation().IsDouble());
 | 
| -      // TODO(jbramley): As with kMathFloor, we can probably handle double
 | 
| -      // results fairly easily, but we are never asked for them.
 | 
|        LOperand* input = UseRegister(instr->value());
 | 
| -      LOperand* temp = FixedTemp(d24);  // Choosen arbitrarily.
 | 
| -      LMathRound* result = new(zone()) LMathRound(input, temp);
 | 
| -      return AssignEnvironment(DefineAsRegister(result));
 | 
| +      if (instr->representation().IsInteger32()) {
 | 
| +        LMathRoundI* result = new(zone()) LMathRoundI(input, FixedTemp(d24));
 | 
| +        return AssignEnvironment(DefineAsRegister(result));
 | 
| +      } else {
 | 
| +        ASSERT(instr->representation().IsDouble());
 | 
| +        LMathRoundD* result =
 | 
| +            new(zone()) LMathRoundD(input, TempRegister());
 | 
| +        return DefineAsRegister(result);
 | 
| +      }
 | 
|      }
 | 
|      case kMathSqrt: {
 | 
|        ASSERT(instr->representation().IsDouble());
 | 
| 
 |