| Index: src/ia32/lithium-ia32.h
|
| diff --git a/src/ia32/lithium-ia32.h b/src/ia32/lithium-ia32.h
|
| index 07c941ae087ddd05411b15234bff747f5f3bc81c..9bd8b711c1b0633911da0b5bd0c87ca5c41190c7 100644
|
| --- a/src/ia32/lithium-ia32.h
|
| +++ b/src/ia32/lithium-ia32.h
|
| @@ -87,6 +87,7 @@ class LCodeGen;
|
| V(DebugBreak) \
|
| V(DeclareGlobals) \
|
| V(Deoptimize) \
|
| + V(DivByConstI) \
|
| V(DivByPowerOf2I) \
|
| V(DivI) \
|
| V(DoubleToI) \
|
| @@ -137,6 +138,7 @@ class LCodeGen;
|
| V(MathPowHalf) \
|
| V(MathRound) \
|
| V(MathSqrt) \
|
| + V(ModByConstI) \
|
| V(ModByPowerOf2I) \
|
| V(ModI) \
|
| V(MulI) \
|
| @@ -655,6 +657,31 @@ class LModByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> {
|
| };
|
|
|
|
|
| +class LModByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> {
|
| + public:
|
| + LModByConstI(LOperand* dividend,
|
| + int32_t divisor,
|
| + LOperand* temp1,
|
| + LOperand* temp2) {
|
| + inputs_[0] = dividend;
|
| + divisor_ = divisor;
|
| + temps_[0] = temp1;
|
| + temps_[1] = temp2;
|
| + }
|
| +
|
| + LOperand* dividend() { return inputs_[0]; }
|
| + int32_t divisor() const { return divisor_; }
|
| + LOperand* temp1() { return temps_[0]; }
|
| + LOperand* temp2() { return temps_[1]; }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(ModByConstI, "mod-by-const-i")
|
| + DECLARE_HYDROGEN_ACCESSOR(Mod)
|
| +
|
| + private:
|
| + int32_t divisor_;
|
| +};
|
| +
|
| +
|
| class LModI V8_FINAL : public LTemplateInstruction<1, 2, 1> {
|
| public:
|
| LModI(LOperand* left, LOperand* right, LOperand* temp) {
|
| @@ -690,6 +717,31 @@ class LDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> {
|
| };
|
|
|
|
|
| +class LDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> {
|
| + public:
|
| + LDivByConstI(LOperand* dividend,
|
| + int32_t divisor,
|
| + LOperand* temp1,
|
| + LOperand* temp2) {
|
| + inputs_[0] = dividend;
|
| + divisor_ = divisor;
|
| + temps_[0] = temp1;
|
| + temps_[1] = temp2;
|
| + }
|
| +
|
| + LOperand* dividend() { return inputs_[0]; }
|
| + int32_t divisor() const { return divisor_; }
|
| + LOperand* temp1() { return temps_[0]; }
|
| + LOperand* temp2() { return temps_[1]; }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(DivByConstI, "div-by-const-i")
|
| + DECLARE_HYDROGEN_ACCESSOR(Div)
|
| +
|
| + private:
|
| + int32_t divisor_;
|
| +};
|
| +
|
| +
|
| class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> {
|
| public:
|
| LDivI(LOperand* left, LOperand* right, LOperand* temp) {
|
| @@ -728,17 +780,22 @@ class LFlooringDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> {
|
| };
|
|
|
|
|
| -class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 1> {
|
| +class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> {
|
| public:
|
| - LFlooringDivByConstI(LOperand* dividend, int32_t divisor, LOperand* temp) {
|
| + LFlooringDivByConstI(LOperand* dividend,
|
| + int32_t divisor,
|
| + LOperand* temp1,
|
| + LOperand* temp2) {
|
| inputs_[0] = dividend;
|
| divisor_ = divisor;
|
| - temps_[0] = temp;
|
| + temps_[0] = temp1;
|
| + temps_[1] = temp2;
|
| }
|
|
|
| LOperand* dividend() { return inputs_[0]; }
|
| int32_t divisor() const { return divisor_; }
|
| - LOperand* temp() { return temps_[0]; }
|
| + LOperand* temp1() { return temps_[0]; }
|
| + LOperand* temp2() { return temps_[1]; }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i")
|
| DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv)
|
| @@ -2691,8 +2748,10 @@ class LChunkBuilder V8_FINAL : public LChunkBuilderBase {
|
| LInstruction* DoMathPowHalf(HUnaryMathOperation* instr);
|
| LInstruction* DoMathClz32(HUnaryMathOperation* instr);
|
| LInstruction* DoDivByPowerOf2I(HDiv* instr);
|
| + LInstruction* DoDivByConstI(HDiv* instr);
|
| LInstruction* DoDivI(HBinaryOperation* instr);
|
| LInstruction* DoModByPowerOf2I(HMod* instr);
|
| + LInstruction* DoModByConstI(HMod* instr);
|
| LInstruction* DoModI(HMod* instr);
|
| LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr);
|
| LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr);
|
|
|