| Index: src/crankshaft/x64/lithium-x64.h
|
| diff --git a/src/crankshaft/x64/lithium-x64.h b/src/crankshaft/x64/lithium-x64.h
|
| index 4831e62b51c75c9b38639879013ca391be6ca74f..96e81c6731c647233d25a887d95b99651665f6a1 100644
|
| --- a/src/crankshaft/x64/lithium-x64.h
|
| +++ b/src/crankshaft/x64/lithium-x64.h
|
| @@ -99,12 +99,14 @@ class LCodeGen;
|
| V(MathAbs) \
|
| V(MathClz32) \
|
| V(MathExp) \
|
| - V(MathFloor) \
|
| + V(MathFloorD) \
|
| + V(MathFloorI) \
|
| V(MathFround) \
|
| V(MathLog) \
|
| V(MathMinMax) \
|
| V(MathPowHalf) \
|
| - V(MathRound) \
|
| + V(MathRoundD) \
|
| + V(MathRoundI) \
|
| V(MathSqrt) \
|
| V(MaybeGrowElements) \
|
| V(ModByConstI) \
|
| @@ -149,7 +151,6 @@ class LCodeGen;
|
| V(UnknownOSRValue) \
|
| V(WrapReceiver)
|
|
|
| -
|
| #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
|
| Opcode opcode() const final { return LInstruction::k##type; } \
|
| void CompileToNative(LCodeGen* generator) final; \
|
| @@ -812,23 +813,43 @@ class LCompareNumericAndBranch final : public LControlInstruction<2, 0> {
|
| void PrintDataTo(StringStream* stream) override;
|
| };
|
|
|
| +// Math.floor with a double result.
|
| +class LMathFloorD final : public LTemplateInstruction<1, 1, 0> {
|
| + public:
|
| + explicit LMathFloorD(LOperand* value) { inputs_[0] = value; }
|
| +
|
| + LOperand* value() { return inputs_[0]; }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(MathFloorD, "math-floor-d")
|
| + DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
|
| +};
|
|
|
| -class LMathFloor final : public LTemplateInstruction<1, 1, 0> {
|
| +// Math.floor with an integer result.
|
| +class LMathFloorI final : public LTemplateInstruction<1, 1, 0> {
|
| public:
|
| - explicit LMathFloor(LOperand* value) {
|
| - inputs_[0] = value;
|
| - }
|
| + explicit LMathFloorI(LOperand* value) { inputs_[0] = value; }
|
|
|
| LOperand* value() { return inputs_[0]; }
|
|
|
| - DECLARE_CONCRETE_INSTRUCTION(MathFloor, "math-floor")
|
| + DECLARE_CONCRETE_INSTRUCTION(MathFloorI, "math-floor-i")
|
| DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
|
| };
|
|
|
| +// Math.round with a double result.
|
| +class LMathRoundD final : public LTemplateInstruction<1, 1, 0> {
|
| + public:
|
| + explicit LMathRoundD(LOperand* value) { inputs_[0] = value; }
|
| +
|
| + LOperand* value() { return inputs_[0]; }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(MathRoundD, "math-round-d")
|
| + DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
|
| +};
|
|
|
| -class LMathRound final : public LTemplateInstruction<1, 1, 1> {
|
| +// Math.round with an integer result.
|
| +class LMathRoundI final : public LTemplateInstruction<1, 1, 1> {
|
| public:
|
| - LMathRound(LOperand* value, LOperand* temp) {
|
| + LMathRoundI(LOperand* value, LOperand* temp) {
|
| inputs_[0] = value;
|
| temps_[0] = temp;
|
| }
|
| @@ -836,7 +857,7 @@ class LMathRound final : public LTemplateInstruction<1, 1, 1> {
|
| LOperand* value() { return inputs_[0]; }
|
| LOperand* temp() { return temps_[0]; }
|
|
|
| - DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round")
|
| + DECLARE_CONCRETE_INSTRUCTION(MathRoundI, "math-round-i")
|
| DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
|
| };
|
|
|
|
|