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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 LDivI(LOperand* left, LOperand* right) { | 576 LDivI(LOperand* left, LOperand* right) { |
576 inputs_[0] = left; | 577 inputs_[0] = left; |
577 inputs_[1] = right; | 578 inputs_[1] = right; |
578 } | 579 } |
579 | 580 |
580 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") | 581 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") |
581 DECLARE_HYDROGEN_ACCESSOR(Div) | 582 DECLARE_HYDROGEN_ACCESSOR(Div) |
582 }; | 583 }; |
583 | 584 |
584 | 585 |
| 586 class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> { |
| 587 public: |
| 588 LMathFloorOfDiv(LOperand* left, |
| 589 LOperand* right, |
| 590 LOperand* temp = NULL) { |
| 591 inputs_[0] = left; |
| 592 inputs_[1] = right; |
| 593 temps_[0] = temp; |
| 594 } |
| 595 |
| 596 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div") |
| 597 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
| 598 }; |
| 599 |
| 600 |
585 class LMulI: public LTemplateInstruction<1, 2, 1> { | 601 class LMulI: public LTemplateInstruction<1, 2, 1> { |
586 public: | 602 public: |
587 LMulI(LOperand* left, LOperand* right, LOperand* temp) { | 603 LMulI(LOperand* left, LOperand* right, LOperand* temp) { |
588 inputs_[0] = left; | 604 inputs_[0] = left; |
589 inputs_[1] = right; | 605 inputs_[1] = right; |
590 temps_[0] = temp; | 606 temps_[0] = temp; |
591 } | 607 } |
592 | 608 |
593 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") | 609 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") |
594 DECLARE_HYDROGEN_ACCESSOR(Mul) | 610 DECLARE_HYDROGEN_ACCESSOR(Mul) |
(...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2267 pending_deoptimization_ast_id_(AstNode::kNoNumber) { } | 2283 pending_deoptimization_ast_id_(AstNode::kNoNumber) { } |
2268 | 2284 |
2269 // Build the sequence for the graph. | 2285 // Build the sequence for the graph. |
2270 LChunk* Build(); | 2286 LChunk* Build(); |
2271 | 2287 |
2272 // Declare methods that deal with the individual node types. | 2288 // Declare methods that deal with the individual node types. |
2273 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); | 2289 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); |
2274 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 2290 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
2275 #undef DECLARE_DO | 2291 #undef DECLARE_DO |
2276 | 2292 |
| 2293 static bool HasMagicNumberForDivisor(int32_t divisor); |
| 2294 static HValue* SimplifiedDividendForMathFloorOfDiv(HValue* val); |
| 2295 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val); |
| 2296 |
2277 private: | 2297 private: |
2278 enum Status { | 2298 enum Status { |
2279 UNUSED, | 2299 UNUSED, |
2280 BUILDING, | 2300 BUILDING, |
2281 DONE, | 2301 DONE, |
2282 ABORTED | 2302 ABORTED |
2283 }; | 2303 }; |
2284 | 2304 |
2285 LChunk* chunk() const { return chunk_; } | 2305 LChunk* chunk() const { return chunk_; } |
2286 CompilationInfo* info() const { return info_; } | 2306 CompilationInfo* info() const { return info_; } |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2403 | 2423 |
2404 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2424 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2405 }; | 2425 }; |
2406 | 2426 |
2407 #undef DECLARE_HYDROGEN_ACCESSOR | 2427 #undef DECLARE_HYDROGEN_ACCESSOR |
2408 #undef DECLARE_CONCRETE_INSTRUCTION | 2428 #undef DECLARE_CONCRETE_INSTRUCTION |
2409 | 2429 |
2410 } } // namespace v8::internal | 2430 } } // namespace v8::internal |
2411 | 2431 |
2412 #endif // V8_ARM_LITHIUM_ARM_H_ | 2432 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |