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(LoadKeyedFastDoubleElement) \ | 128 V(LoadKeyedFastDoubleElement) \ |
129 V(LoadKeyedFastElement) \ | 129 V(LoadKeyedFastElement) \ |
130 V(LoadKeyedGeneric) \ | 130 V(LoadKeyedGeneric) \ |
131 V(LoadKeyedSpecializedArrayElement) \ | 131 V(LoadKeyedSpecializedArrayElement) \ |
132 V(LoadNamedField) \ | 132 V(LoadNamedField) \ |
133 V(LoadNamedFieldPolymorphic) \ | 133 V(LoadNamedFieldPolymorphic) \ |
134 V(LoadNamedGeneric) \ | 134 V(LoadNamedGeneric) \ |
| 135 V(MathFloorOfDiv) \ |
135 V(ModI) \ | 136 V(ModI) \ |
136 V(MulI) \ | 137 V(MulI) \ |
137 V(NumberTagD) \ | 138 V(NumberTagD) \ |
138 V(NumberTagI) \ | 139 V(NumberTagI) \ |
139 V(NumberUntagD) \ | 140 V(NumberUntagD) \ |
140 V(ObjectLiteral) \ | 141 V(ObjectLiteral) \ |
141 V(OsrEntry) \ | 142 V(OsrEntry) \ |
142 V(OuterContext) \ | 143 V(OuterContext) \ |
143 V(Parameter) \ | 144 V(Parameter) \ |
144 V(Power) \ | 145 V(Power) \ |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 LDivI(LOperand* left, LOperand* right) { | 573 LDivI(LOperand* left, LOperand* right) { |
573 inputs_[0] = left; | 574 inputs_[0] = left; |
574 inputs_[1] = right; | 575 inputs_[1] = right; |
575 } | 576 } |
576 | 577 |
577 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") | 578 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") |
578 DECLARE_HYDROGEN_ACCESSOR(Div) | 579 DECLARE_HYDROGEN_ACCESSOR(Div) |
579 }; | 580 }; |
580 | 581 |
581 | 582 |
| 583 class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> { |
| 584 public: |
| 585 LMathFloorOfDiv(LOperand* left, |
| 586 LOperand* right, |
| 587 LOperand* temp = NULL) { |
| 588 inputs_[0] = left; |
| 589 inputs_[1] = right; |
| 590 temps_[0] = temp; |
| 591 } |
| 592 |
| 593 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div") |
| 594 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
| 595 }; |
| 596 |
| 597 |
582 class LMulI: public LTemplateInstruction<1, 2, 1> { | 598 class LMulI: public LTemplateInstruction<1, 2, 1> { |
583 public: | 599 public: |
584 LMulI(LOperand* left, LOperand* right, LOperand* temp) { | 600 LMulI(LOperand* left, LOperand* right, LOperand* temp) { |
585 inputs_[0] = left; | 601 inputs_[0] = left; |
586 inputs_[1] = right; | 602 inputs_[1] = right; |
587 temps_[0] = temp; | 603 temps_[0] = temp; |
588 } | 604 } |
589 | 605 |
590 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") | 606 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") |
591 DECLARE_HYDROGEN_ACCESSOR(Mul) | 607 DECLARE_HYDROGEN_ACCESSOR(Mul) |
(...skipping 1688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2280 pending_deoptimization_ast_id_(AstNode::kNoNumber) { } | 2296 pending_deoptimization_ast_id_(AstNode::kNoNumber) { } |
2281 | 2297 |
2282 // Build the sequence for the graph. | 2298 // Build the sequence for the graph. |
2283 LChunk* Build(); | 2299 LChunk* Build(); |
2284 | 2300 |
2285 // Declare methods that deal with the individual node types. | 2301 // Declare methods that deal with the individual node types. |
2286 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); | 2302 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); |
2287 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 2303 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
2288 #undef DECLARE_DO | 2304 #undef DECLARE_DO |
2289 | 2305 |
| 2306 static bool HasMagicNumberForDivisor(int32_t divisor); |
| 2307 static HValue* SimplifiedDividendForMathFloorOfDiv(HValue* val); |
| 2308 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val); |
| 2309 |
2290 private: | 2310 private: |
2291 enum Status { | 2311 enum Status { |
2292 UNUSED, | 2312 UNUSED, |
2293 BUILDING, | 2313 BUILDING, |
2294 DONE, | 2314 DONE, |
2295 ABORTED | 2315 ABORTED |
2296 }; | 2316 }; |
2297 | 2317 |
2298 LChunk* chunk() const { return chunk_; } | 2318 LChunk* chunk() const { return chunk_; } |
2299 CompilationInfo* info() const { return info_; } | 2319 CompilationInfo* info() const { return info_; } |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2416 | 2436 |
2417 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2437 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2418 }; | 2438 }; |
2419 | 2439 |
2420 #undef DECLARE_HYDROGEN_ACCESSOR | 2440 #undef DECLARE_HYDROGEN_ACCESSOR |
2421 #undef DECLARE_CONCRETE_INSTRUCTION | 2441 #undef DECLARE_CONCRETE_INSTRUCTION |
2422 | 2442 |
2423 } } // namespace v8::internal | 2443 } } // namespace v8::internal |
2424 | 2444 |
2425 #endif // V8_ARM_LITHIUM_ARM_H_ | 2445 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |