| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 V(LoadFunctionPrototype) \ | 125 V(LoadFunctionPrototype) \ |
| 126 V(LoadGlobalCell) \ | 126 V(LoadGlobalCell) \ |
| 127 V(LoadGlobalGeneric) \ | 127 V(LoadGlobalGeneric) \ |
| 128 V(LoadKeyed) \ | 128 V(LoadKeyed) \ |
| 129 V(LoadKeyedGeneric) \ | 129 V(LoadKeyedGeneric) \ |
| 130 V(LoadNamedField) \ | 130 V(LoadNamedField) \ |
| 131 V(LoadNamedFieldPolymorphic) \ | 131 V(LoadNamedFieldPolymorphic) \ |
| 132 V(LoadNamedGeneric) \ | 132 V(LoadNamedGeneric) \ |
| 133 V(MapEnumLength) \ | 133 V(MapEnumLength) \ |
| 134 V(MathExp) \ | 134 V(MathExp) \ |
| 135 V(MathFloorOfDiv) \ |
| 135 V(MathMinMax) \ | 136 V(MathMinMax) \ |
| 136 V(ModI) \ | 137 V(ModI) \ |
| 137 V(MulI) \ | 138 V(MulI) \ |
| 138 V(MultiplyAddD) \ | 139 V(MultiplyAddD) \ |
| 139 V(NumberTagD) \ | 140 V(NumberTagD) \ |
| 140 V(NumberTagI) \ | 141 V(NumberTagI) \ |
| 141 V(NumberTagU) \ | 142 V(NumberTagU) \ |
| 142 V(NumberUntagD) \ | 143 V(NumberUntagD) \ |
| 143 V(ObjectLiteral) \ | 144 V(ObjectLiteral) \ |
| 144 V(OsrEntry) \ | 145 V(OsrEntry) \ |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 } | 586 } |
| 586 | 587 |
| 587 LOperand* left() { return inputs_[0]; } | 588 LOperand* left() { return inputs_[0]; } |
| 588 LOperand* right() { return inputs_[1]; } | 589 LOperand* right() { return inputs_[1]; } |
| 589 | 590 |
| 590 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") | 591 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") |
| 591 DECLARE_HYDROGEN_ACCESSOR(Div) | 592 DECLARE_HYDROGEN_ACCESSOR(Div) |
| 592 }; | 593 }; |
| 593 | 594 |
| 594 | 595 |
| 596 class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> { |
| 597 public: |
| 598 LMathFloorOfDiv(LOperand* left, |
| 599 LOperand* right, |
| 600 LOperand* temp = NULL) { |
| 601 inputs_[0] = left; |
| 602 inputs_[1] = right; |
| 603 temps_[0] = temp; |
| 604 } |
| 605 |
| 606 LOperand* left() { return inputs_[0]; } |
| 607 LOperand* right() { return inputs_[1]; } |
| 608 LOperand* temp() { return temps_[0]; } |
| 609 |
| 610 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div") |
| 611 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
| 612 }; |
| 613 |
| 614 |
| 595 class LMulI: public LTemplateInstruction<1, 2, 1> { | 615 class LMulI: public LTemplateInstruction<1, 2, 1> { |
| 596 public: | 616 public: |
| 597 LMulI(LOperand* left, LOperand* right, LOperand* temp) { | 617 LMulI(LOperand* left, LOperand* right, LOperand* temp) { |
| 598 inputs_[0] = left; | 618 inputs_[0] = left; |
| 599 inputs_[1] = right; | 619 inputs_[1] = right; |
| 600 temps_[0] = temp; | 620 temps_[0] = temp; |
| 601 } | 621 } |
| 602 | 622 |
| 603 LOperand* left() { return inputs_[0]; } | 623 LOperand* left() { return inputs_[0]; } |
| 604 LOperand* right() { return inputs_[1]; } | 624 LOperand* right() { return inputs_[1]; } |
| (...skipping 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2447 // Build the sequence for the graph. | 2467 // Build the sequence for the graph. |
| 2448 LPlatformChunk* Build(); | 2468 LPlatformChunk* Build(); |
| 2449 | 2469 |
| 2450 // Declare methods that deal with the individual node types. | 2470 // Declare methods that deal with the individual node types. |
| 2451 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); | 2471 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); |
| 2452 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 2472 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
| 2453 #undef DECLARE_DO | 2473 #undef DECLARE_DO |
| 2454 | 2474 |
| 2455 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend); | 2475 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend); |
| 2456 | 2476 |
| 2477 static bool HasMagicNumberForDivisor(int32_t divisor); |
| 2478 static HValue* SimplifiedDividendForMathFloorOfDiv(HValue* val); |
| 2479 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val); |
| 2480 |
| 2457 private: | 2481 private: |
| 2458 enum Status { | 2482 enum Status { |
| 2459 UNUSED, | 2483 UNUSED, |
| 2460 BUILDING, | 2484 BUILDING, |
| 2461 DONE, | 2485 DONE, |
| 2462 ABORTED | 2486 ABORTED |
| 2463 }; | 2487 }; |
| 2464 | 2488 |
| 2465 LPlatformChunk* chunk() const { return chunk_; } | 2489 LPlatformChunk* chunk() const { return chunk_; } |
| 2466 CompilationInfo* info() const { return info_; } | 2490 CompilationInfo* info() const { return info_; } |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2579 | 2603 |
| 2580 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2604 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2581 }; | 2605 }; |
| 2582 | 2606 |
| 2583 #undef DECLARE_HYDROGEN_ACCESSOR | 2607 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2584 #undef DECLARE_CONCRETE_INSTRUCTION | 2608 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2585 | 2609 |
| 2586 } } // namespace v8::internal | 2610 } } // namespace v8::internal |
| 2587 | 2611 |
| 2588 #endif // V8_MIPS_LITHIUM_MIPS_H_ | 2612 #endif // V8_MIPS_LITHIUM_MIPS_H_ |
| OLD | NEW |