| Index: src/crankshaft/ppc/lithium-ppc.h
|
| diff --git a/src/crankshaft/ppc/lithium-ppc.h b/src/crankshaft/ppc/lithium-ppc.h
|
| index 9245f849f627d1b65375ddcd5262eafd4a85f450..516cadd06ceb0bab78bbdc9765567bdfb21fcf17 100644
|
| --- a/src/crankshaft/ppc/lithium-ppc.h
|
| +++ b/src/crankshaft/ppc/lithium-ppc.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) \
|
| @@ -151,7 +153,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; \
|
| @@ -807,21 +808,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;
|
| }
|
| @@ -829,7 +852,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)
|
| };
|
|
|
|
|