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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(MathFloorOfDiv) \ | 134 V(MathFloorOfDiv) \ |
135 V(MathMinMax) \ | 135 V(MathMinMax) \ |
136 V(ModI) \ | 136 V(ModI) \ |
137 V(MulI) \ | 137 V(MulI) \ |
| 138 V(MultiplyAddD) \ |
138 V(NumberTagD) \ | 139 V(NumberTagD) \ |
139 V(NumberTagI) \ | 140 V(NumberTagI) \ |
140 V(NumberTagU) \ | 141 V(NumberTagU) \ |
141 V(NumberUntagD) \ | 142 V(NumberUntagD) \ |
142 V(ObjectLiteral) \ | 143 V(ObjectLiteral) \ |
143 V(OsrEntry) \ | 144 V(OsrEntry) \ |
144 V(OuterContext) \ | 145 V(OuterContext) \ |
145 V(Parameter) \ | 146 V(Parameter) \ |
146 V(Power) \ | 147 V(Power) \ |
147 V(PushArgument) \ | 148 V(PushArgument) \ |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 | 615 |
615 LOperand* left() { return inputs_[0]; } | 616 LOperand* left() { return inputs_[0]; } |
616 LOperand* right() { return inputs_[1]; } | 617 LOperand* right() { return inputs_[1]; } |
617 LOperand* temp() { return temps_[0]; } | 618 LOperand* temp() { return temps_[0]; } |
618 | 619 |
619 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") | 620 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") |
620 DECLARE_HYDROGEN_ACCESSOR(Mul) | 621 DECLARE_HYDROGEN_ACCESSOR(Mul) |
621 }; | 622 }; |
622 | 623 |
623 | 624 |
| 625 // Instruction for computing multiplier * multiplicand + addend. |
| 626 class LMultiplyAddD: public LTemplateInstruction<1, 3, 0> { |
| 627 public: |
| 628 LMultiplyAddD(LOperand* addend, LOperand* multiplier, |
| 629 LOperand* multiplicand) { |
| 630 inputs_[0] = addend; |
| 631 inputs_[1] = multiplier; |
| 632 inputs_[2] = multiplicand; |
| 633 } |
| 634 |
| 635 LOperand* addend() { return inputs_[0]; } |
| 636 LOperand* multiplier() { return inputs_[1]; } |
| 637 LOperand* multiplicand() { return inputs_[2]; } |
| 638 |
| 639 DECLARE_CONCRETE_INSTRUCTION(MultiplyAddD, "multiply-add-d") |
| 640 }; |
| 641 |
| 642 |
624 class LCmpIDAndBranch: public LControlInstruction<2, 0> { | 643 class LCmpIDAndBranch: public LControlInstruction<2, 0> { |
625 public: | 644 public: |
626 LCmpIDAndBranch(LOperand* left, LOperand* right) { | 645 LCmpIDAndBranch(LOperand* left, LOperand* right) { |
627 inputs_[0] = left; | 646 inputs_[0] = left; |
628 inputs_[1] = right; | 647 inputs_[1] = right; |
629 } | 648 } |
630 | 649 |
631 LOperand* left() { return inputs_[0]; } | 650 LOperand* left() { return inputs_[0]; } |
632 LOperand* right() { return inputs_[1]; } | 651 LOperand* right() { return inputs_[1]; } |
633 | 652 |
(...skipping 1755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2389 pending_deoptimization_ast_id_(BailoutId::None()) { } | 2408 pending_deoptimization_ast_id_(BailoutId::None()) { } |
2390 | 2409 |
2391 // Build the sequence for the graph. | 2410 // Build the sequence for the graph. |
2392 LPlatformChunk* Build(); | 2411 LPlatformChunk* Build(); |
2393 | 2412 |
2394 // Declare methods that deal with the individual node types. | 2413 // Declare methods that deal with the individual node types. |
2395 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); | 2414 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); |
2396 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 2415 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
2397 #undef DECLARE_DO | 2416 #undef DECLARE_DO |
2398 | 2417 |
| 2418 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend); |
| 2419 |
2399 static bool HasMagicNumberForDivisor(int32_t divisor); | 2420 static bool HasMagicNumberForDivisor(int32_t divisor); |
2400 static HValue* SimplifiedDividendForMathFloorOfDiv(HValue* val); | 2421 static HValue* SimplifiedDividendForMathFloorOfDiv(HValue* val); |
2401 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val); | 2422 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val); |
2402 | 2423 |
2403 private: | 2424 private: |
2404 enum Status { | 2425 enum Status { |
2405 UNUSED, | 2426 UNUSED, |
2406 BUILDING, | 2427 BUILDING, |
2407 DONE, | 2428 DONE, |
2408 ABORTED | 2429 ABORTED |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2524 | 2545 |
2525 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2546 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2526 }; | 2547 }; |
2527 | 2548 |
2528 #undef DECLARE_HYDROGEN_ACCESSOR | 2549 #undef DECLARE_HYDROGEN_ACCESSOR |
2529 #undef DECLARE_CONCRETE_INSTRUCTION | 2550 #undef DECLARE_CONCRETE_INSTRUCTION |
2530 | 2551 |
2531 } } // namespace v8::internal | 2552 } } // namespace v8::internal |
2532 | 2553 |
2533 #endif // V8_ARM_LITHIUM_ARM_H_ | 2554 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |