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_COMPILER_INSTRUCTION_H_ | 5 #ifndef V8_COMPILER_INSTRUCTION_H_ |
6 #define V8_COMPILER_INSTRUCTION_H_ | 6 #define V8_COMPILER_INSTRUCTION_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 #include <map> | 10 #include <map> |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 value_ |= ExtendedPolicyField::encode(policy); | 122 value_ |= ExtendedPolicyField::encode(policy); |
123 value_ |= LifetimeField::encode(USED_AT_END); | 123 value_ |= LifetimeField::encode(USED_AT_END); |
124 } | 124 } |
125 | 125 |
126 UnallocatedOperand(BasicPolicy policy, int index) | 126 UnallocatedOperand(BasicPolicy policy, int index) |
127 : InstructionOperand(UNALLOCATED, 0) { | 127 : InstructionOperand(UNALLOCATED, 0) { |
128 DCHECK(policy == FIXED_SLOT); | 128 DCHECK(policy == FIXED_SLOT); |
129 value_ |= VirtualRegisterField::encode(kInvalidVirtualRegister); | 129 value_ |= VirtualRegisterField::encode(kInvalidVirtualRegister); |
130 value_ |= BasicPolicyField::encode(policy); | 130 value_ |= BasicPolicyField::encode(policy); |
131 value_ |= index << FixedSlotIndexField::kShift; | 131 value_ |= index << FixedSlotIndexField::kShift; |
132 DCHECK(this->fixed_slot_index() == index); | 132 // TODO(dcarney): 2^10 is not enough for the fixed slot index. |
| 133 CHECK(this->fixed_slot_index() == index); |
133 } | 134 } |
134 | 135 |
135 UnallocatedOperand(ExtendedPolicy policy, int index) | 136 UnallocatedOperand(ExtendedPolicy policy, int index) |
136 : InstructionOperand(UNALLOCATED, 0) { | 137 : InstructionOperand(UNALLOCATED, 0) { |
137 DCHECK(policy == FIXED_REGISTER || policy == FIXED_DOUBLE_REGISTER); | 138 DCHECK(policy == FIXED_REGISTER || policy == FIXED_DOUBLE_REGISTER); |
138 value_ |= VirtualRegisterField::encode(kInvalidVirtualRegister); | 139 value_ |= VirtualRegisterField::encode(kInvalidVirtualRegister); |
139 value_ |= BasicPolicyField::encode(EXTENDED_POLICY); | 140 value_ |= BasicPolicyField::encode(EXTENDED_POLICY); |
140 value_ |= ExtendedPolicyField::encode(policy); | 141 value_ |= ExtendedPolicyField::encode(policy); |
141 value_ |= LifetimeField::encode(USED_AT_END); | 142 value_ |= LifetimeField::encode(USED_AT_END); |
142 value_ |= FixedRegisterField::encode(index); | 143 value_ |= FixedRegisterField::encode(index); |
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 | 1087 |
1087 | 1088 |
1088 std::ostream& operator<<(std::ostream& os, | 1089 std::ostream& operator<<(std::ostream& os, |
1089 const PrintableInstructionSequence& code); | 1090 const PrintableInstructionSequence& code); |
1090 | 1091 |
1091 } // namespace compiler | 1092 } // namespace compiler |
1092 } // namespace internal | 1093 } // namespace internal |
1093 } // namespace v8 | 1094 } // namespace v8 |
1094 | 1095 |
1095 #endif // V8_COMPILER_INSTRUCTION_H_ | 1096 #endif // V8_COMPILER_INSTRUCTION_H_ |
OLD | NEW |