OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ | 5 #ifndef V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ |
6 #define V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ | 6 #define V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ |
7 | 7 |
8 #include "src/crankshaft/hydrogen.h" | 8 #include "src/crankshaft/hydrogen.h" |
9 #include "src/crankshaft/lithium.h" | 9 #include "src/crankshaft/lithium.h" |
10 #include "src/crankshaft/lithium-allocator.h" | 10 #include "src/crankshaft/lithium-allocator.h" |
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 inputs_[2] = right; | 1088 inputs_[2] = right; |
1089 } | 1089 } |
1090 | 1090 |
1091 LOperand* context() { return inputs_[0]; } | 1091 LOperand* context() { return inputs_[0]; } |
1092 LOperand* left() { return inputs_[1]; } | 1092 LOperand* left() { return inputs_[1]; } |
1093 LOperand* right() { return inputs_[2]; } | 1093 LOperand* right() { return inputs_[2]; } |
1094 | 1094 |
1095 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") | 1095 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") |
1096 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric) | 1096 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric) |
1097 | 1097 |
1098 Strength strength() { return hydrogen()->strength(); } | |
1099 | |
1100 Token::Value op() const { return hydrogen()->token(); } | 1098 Token::Value op() const { return hydrogen()->token(); } |
1101 }; | 1099 }; |
1102 | 1100 |
1103 | 1101 |
1104 class LInstanceOf final : public LTemplateInstruction<1, 3, 0> { | 1102 class LInstanceOf final : public LTemplateInstruction<1, 3, 0> { |
1105 public: | 1103 public: |
1106 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { | 1104 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { |
1107 inputs_[0] = context; | 1105 inputs_[0] = context; |
1108 inputs_[1] = left; | 1106 inputs_[1] = left; |
1109 inputs_[2] = right; | 1107 inputs_[2] = right; |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 LOperand* left() { return inputs_[1]; } | 1407 LOperand* left() { return inputs_[1]; } |
1410 LOperand* right() { return inputs_[2]; } | 1408 LOperand* right() { return inputs_[2]; } |
1411 Token::Value op() const { return op_; } | 1409 Token::Value op() const { return op_; } |
1412 | 1410 |
1413 Opcode opcode() const override { return LInstruction::kArithmeticT; } | 1411 Opcode opcode() const override { return LInstruction::kArithmeticT; } |
1414 void CompileToNative(LCodeGen* generator) override; | 1412 void CompileToNative(LCodeGen* generator) override; |
1415 const char* Mnemonic() const override; | 1413 const char* Mnemonic() const override; |
1416 | 1414 |
1417 DECLARE_HYDROGEN_ACCESSOR(BinaryOperation) | 1415 DECLARE_HYDROGEN_ACCESSOR(BinaryOperation) |
1418 | 1416 |
1419 Strength strength() { return hydrogen()->strength(); } | |
1420 | |
1421 private: | 1417 private: |
1422 Token::Value op_; | 1418 Token::Value op_; |
1423 }; | 1419 }; |
1424 | 1420 |
1425 | 1421 |
1426 class LReturn final : public LTemplateInstruction<0, 3, 0> { | 1422 class LReturn final : public LTemplateInstruction<0, 3, 0> { |
1427 public: | 1423 public: |
1428 LReturn(LOperand* value, LOperand* context, LOperand* parameter_count) { | 1424 LReturn(LOperand* value, LOperand* context, LOperand* parameter_count) { |
1429 inputs_[0] = value; | 1425 inputs_[0] = value; |
1430 inputs_[1] = context; | 1426 inputs_[1] = context; |
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2630 | 2626 |
2631 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2627 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2632 }; | 2628 }; |
2633 | 2629 |
2634 #undef DECLARE_HYDROGEN_ACCESSOR | 2630 #undef DECLARE_HYDROGEN_ACCESSOR |
2635 #undef DECLARE_CONCRETE_INSTRUCTION | 2631 #undef DECLARE_CONCRETE_INSTRUCTION |
2636 } // namespace internal | 2632 } // namespace internal |
2637 } // namespace v8 | 2633 } // namespace v8 |
2638 | 2634 |
2639 #endif // V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ | 2635 #endif // V8_CRANKSHAFT_PPC_LITHIUM_PPC_H_ |
OLD | NEW |