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 108 matching lines...) Loading... |
119 V(LoadFunctionPrototype) \ | 119 V(LoadFunctionPrototype) \ |
120 V(LoadGlobalCell) \ | 120 V(LoadGlobalCell) \ |
121 V(LoadGlobalGeneric) \ | 121 V(LoadGlobalGeneric) \ |
122 V(LoadKeyedFastElement) \ | 122 V(LoadKeyedFastElement) \ |
123 V(LoadKeyedFastDoubleElement) \ | 123 V(LoadKeyedFastDoubleElement) \ |
124 V(LoadKeyedGeneric) \ | 124 V(LoadKeyedGeneric) \ |
125 V(LoadKeyedSpecializedArrayElement) \ | 125 V(LoadKeyedSpecializedArrayElement) \ |
126 V(LoadNamedField) \ | 126 V(LoadNamedField) \ |
127 V(LoadNamedFieldPolymorphic) \ | 127 V(LoadNamedFieldPolymorphic) \ |
128 V(LoadNamedGeneric) \ | 128 V(LoadNamedGeneric) \ |
| 129 V(MathFloorOfDiv) \ |
129 V(MathPowHalf) \ | 130 V(MathPowHalf) \ |
130 V(ModI) \ | 131 V(ModI) \ |
131 V(MulI) \ | 132 V(MulI) \ |
132 V(NumberTagD) \ | 133 V(NumberTagD) \ |
133 V(NumberTagI) \ | 134 V(NumberTagI) \ |
134 V(NumberUntagD) \ | 135 V(NumberUntagD) \ |
135 V(ObjectLiteral) \ | 136 V(ObjectLiteral) \ |
136 V(OsrEntry) \ | 137 V(OsrEntry) \ |
137 V(OuterContext) \ | 138 V(OuterContext) \ |
138 V(Parameter) \ | 139 V(Parameter) \ |
(...skipping 400 matching lines...) Loading... |
539 inputs_[0] = left; | 540 inputs_[0] = left; |
540 inputs_[1] = right; | 541 inputs_[1] = right; |
541 temps_[0] = temp; | 542 temps_[0] = temp; |
542 } | 543 } |
543 | 544 |
544 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") | 545 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") |
545 DECLARE_HYDROGEN_ACCESSOR(Div) | 546 DECLARE_HYDROGEN_ACCESSOR(Div) |
546 }; | 547 }; |
547 | 548 |
548 | 549 |
| 550 class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> { |
| 551 public: |
| 552 LMathFloorOfDiv(LOperand* left, |
| 553 LOperand* right, |
| 554 LOperand* temp = NULL) { |
| 555 inputs_[0] = left; |
| 556 inputs_[1] = right; |
| 557 temps_[0] = temp; |
| 558 } |
| 559 |
| 560 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div") |
| 561 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
| 562 }; |
| 563 |
| 564 |
549 class LMulI: public LTemplateInstruction<1, 2, 1> { | 565 class LMulI: public LTemplateInstruction<1, 2, 1> { |
550 public: | 566 public: |
551 LMulI(LOperand* left, LOperand* right, LOperand* temp) { | 567 LMulI(LOperand* left, LOperand* right, LOperand* temp) { |
552 inputs_[0] = left; | 568 inputs_[0] = left; |
553 inputs_[1] = right; | 569 inputs_[1] = right; |
554 temps_[0] = temp; | 570 temps_[0] = temp; |
555 } | 571 } |
556 | 572 |
557 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") | 573 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") |
558 DECLARE_HYDROGEN_ACCESSOR(Mul) | 574 DECLARE_HYDROGEN_ACCESSOR(Mul) |
(...skipping 1833 matching lines...) Loading... |
2392 pending_deoptimization_ast_id_(AstNode::kNoNumber) { } | 2408 pending_deoptimization_ast_id_(AstNode::kNoNumber) { } |
2393 | 2409 |
2394 // Build the sequence for the graph. | 2410 // Build the sequence for the graph. |
2395 LChunk* Build(); | 2411 LChunk* Build(); |
2396 | 2412 |
2397 // Declare methods that deal with the individual node types. | 2413 // Declare methods that deal with the individual node types. |
2398 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); | 2414 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); |
2399 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 2415 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
2400 #undef DECLARE_DO | 2416 #undef DECLARE_DO |
2401 | 2417 |
| 2418 static HValue* SimplifiedDividendForMathFloorOfDiv(HValue* val); |
| 2419 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val); |
| 2420 |
2402 private: | 2421 private: |
2403 enum Status { | 2422 enum Status { |
2404 UNUSED, | 2423 UNUSED, |
2405 BUILDING, | 2424 BUILDING, |
2406 DONE, | 2425 DONE, |
2407 ABORTED | 2426 ABORTED |
2408 }; | 2427 }; |
2409 | 2428 |
2410 LChunk* chunk() const { return chunk_; } | 2429 LChunk* chunk() const { return chunk_; } |
2411 CompilationInfo* info() const { return info_; } | 2430 CompilationInfo* info() const { return info_; } |
(...skipping 115 matching lines...) Loading... |
2527 | 2546 |
2528 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2547 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2529 }; | 2548 }; |
2530 | 2549 |
2531 #undef DECLARE_HYDROGEN_ACCESSOR | 2550 #undef DECLARE_HYDROGEN_ACCESSOR |
2532 #undef DECLARE_CONCRETE_INSTRUCTION | 2551 #undef DECLARE_CONCRETE_INSTRUCTION |
2533 | 2552 |
2534 } } // namespace v8::internal | 2553 } } // namespace v8::internal |
2535 | 2554 |
2536 #endif // V8_IA32_LITHIUM_IA32_H_ | 2555 #endif // V8_IA32_LITHIUM_IA32_H_ |
OLD | NEW |