OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_X87_LITHIUM_X87_H_ | 5 #ifndef V8_CRANKSHAFT_X87_LITHIUM_X87_H_ |
6 #define V8_CRANKSHAFT_X87_LITHIUM_X87_H_ | 6 #define V8_CRANKSHAFT_X87_LITHIUM_X87_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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 V(InvokeFunction) \ | 87 V(InvokeFunction) \ |
88 V(IsStringAndBranch) \ | 88 V(IsStringAndBranch) \ |
89 V(IsSmiAndBranch) \ | 89 V(IsSmiAndBranch) \ |
90 V(IsUndetectableAndBranch) \ | 90 V(IsUndetectableAndBranch) \ |
91 V(Label) \ | 91 V(Label) \ |
92 V(LazyBailout) \ | 92 V(LazyBailout) \ |
93 V(LoadContextSlot) \ | 93 V(LoadContextSlot) \ |
94 V(LoadFieldByIndex) \ | 94 V(LoadFieldByIndex) \ |
95 V(LoadFunctionPrototype) \ | 95 V(LoadFunctionPrototype) \ |
96 V(LoadKeyed) \ | 96 V(LoadKeyed) \ |
97 V(LoadKeyedGeneric) \ | |
98 V(LoadNamedField) \ | 97 V(LoadNamedField) \ |
99 V(LoadRoot) \ | 98 V(LoadRoot) \ |
100 V(MathAbs) \ | 99 V(MathAbs) \ |
101 V(MathClz32) \ | 100 V(MathClz32) \ |
102 V(MathCos) \ | 101 V(MathCos) \ |
103 V(MathExp) \ | 102 V(MathExp) \ |
104 V(MathFloor) \ | 103 V(MathFloor) \ |
105 V(MathFround) \ | 104 V(MathFround) \ |
106 V(MathLog) \ | 105 V(MathLog) \ |
107 V(MathMinMax) \ | 106 V(MathMinMax) \ |
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1538 ElementsKind elements_kind) { | 1537 ElementsKind elements_kind) { |
1539 // Operations that require the key to be divided by two to be converted into | 1538 // Operations that require the key to be divided by two to be converted into |
1540 // an index cannot fold the scale operation into a load and need an extra | 1539 // an index cannot fold the scale operation into a load and need an extra |
1541 // temp register to do the work. | 1540 // temp register to do the work. |
1542 return key_representation.IsSmi() && | 1541 return key_representation.IsSmi() && |
1543 (elements_kind == UINT8_ELEMENTS || elements_kind == INT8_ELEMENTS || | 1542 (elements_kind == UINT8_ELEMENTS || elements_kind == INT8_ELEMENTS || |
1544 elements_kind == UINT8_CLAMPED_ELEMENTS); | 1543 elements_kind == UINT8_CLAMPED_ELEMENTS); |
1545 } | 1544 } |
1546 | 1545 |
1547 | 1546 |
1548 class LLoadKeyedGeneric final : public LTemplateInstruction<1, 3, 1> { | |
1549 public: | |
1550 LLoadKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key, | |
1551 LOperand* vector) { | |
1552 inputs_[0] = context; | |
1553 inputs_[1] = obj; | |
1554 inputs_[2] = key; | |
1555 temps_[0] = vector; | |
1556 } | |
1557 | |
1558 LOperand* context() { return inputs_[0]; } | |
1559 LOperand* object() { return inputs_[1]; } | |
1560 LOperand* key() { return inputs_[2]; } | |
1561 LOperand* temp_vector() { return temps_[0]; } | |
1562 | |
1563 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") | |
1564 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedGeneric) | |
1565 }; | |
1566 | |
1567 class LLoadContextSlot final : public LTemplateInstruction<1, 1, 0> { | 1547 class LLoadContextSlot final : public LTemplateInstruction<1, 1, 0> { |
1568 public: | 1548 public: |
1569 explicit LLoadContextSlot(LOperand* context) { | 1549 explicit LLoadContextSlot(LOperand* context) { |
1570 inputs_[0] = context; | 1550 inputs_[0] = context; |
1571 } | 1551 } |
1572 | 1552 |
1573 LOperand* context() { return inputs_[0]; } | 1553 LOperand* context() { return inputs_[0]; } |
1574 | 1554 |
1575 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") | 1555 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") |
1576 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) | 1556 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) |
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2550 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2530 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2551 }; | 2531 }; |
2552 | 2532 |
2553 #undef DECLARE_HYDROGEN_ACCESSOR | 2533 #undef DECLARE_HYDROGEN_ACCESSOR |
2554 #undef DECLARE_CONCRETE_INSTRUCTION | 2534 #undef DECLARE_CONCRETE_INSTRUCTION |
2555 | 2535 |
2556 } // namespace internal | 2536 } // namespace internal |
2557 } // namespace v8 | 2537 } // namespace v8 |
2558 | 2538 |
2559 #endif // V8_CRANKSHAFT_X87_LITHIUM_X87_H_ | 2539 #endif // V8_CRANKSHAFT_X87_LITHIUM_X87_H_ |
OLD | NEW |