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 #include "src/bit-vector.h" | 5 #include "src/bit-vector.h" |
6 #include "src/compiler/instruction.h" | 6 #include "src/compiler/instruction.h" |
7 #include "src/compiler/register-allocator-verifier.h" | 7 #include "src/compiler/register-allocator-verifier.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 CHECK(op->IsUnallocated()); | 153 CHECK(op->IsUnallocated()); |
154 const auto* unallocated = UnallocatedOperand::cast(op); | 154 const auto* unallocated = UnallocatedOperand::cast(op); |
155 int vreg = unallocated->virtual_register(); | 155 int vreg = unallocated->virtual_register(); |
156 constraint->virtual_register_ = vreg; | 156 constraint->virtual_register_ = vreg; |
157 if (unallocated->basic_policy() == UnallocatedOperand::FIXED_SLOT) { | 157 if (unallocated->basic_policy() == UnallocatedOperand::FIXED_SLOT) { |
158 constraint->type_ = sequence()->IsFloat(vreg) ? kDoubleSlot : kSlot; | 158 constraint->type_ = sequence()->IsFloat(vreg) ? kDoubleSlot : kSlot; |
159 constraint->value_ = unallocated->fixed_slot_index(); | 159 constraint->value_ = unallocated->fixed_slot_index(); |
160 } else { | 160 } else { |
161 switch (unallocated->extended_policy()) { | 161 switch (unallocated->extended_policy()) { |
162 case UnallocatedOperand::ANY: | 162 case UnallocatedOperand::ANY: |
163 CHECK(false); | |
164 break; | |
165 case UnallocatedOperand::NONE: | 163 case UnallocatedOperand::NONE: |
166 if (sequence()->IsFloat(vreg)) { | 164 if (sequence()->IsFloat(vreg)) { |
167 constraint->type_ = kNoneDouble; | 165 constraint->type_ = kNoneDouble; |
168 } else { | 166 } else { |
169 constraint->type_ = kNone; | 167 constraint->type_ = kNone; |
170 } | 168 } |
171 break; | 169 break; |
172 case UnallocatedOperand::FIXED_REGISTER: | 170 case UnallocatedOperand::FIXED_REGISTER: |
173 constraint->type_ = kFixedRegister; | 171 constraint->type_ = kFixedRegister; |
174 constraint->value_ = unallocated->fixed_register_index(); | 172 constraint->value_ = unallocated->fixed_register_index(); |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 int virtual_register = op_constraints[count].virtual_register_; | 696 int virtual_register = op_constraints[count].virtual_register_; |
699 current->Define(zone(), instr->OutputAt(i), virtual_register); | 697 current->Define(zone(), instr->OutputAt(i), virtual_register); |
700 } | 698 } |
701 } | 699 } |
702 } | 700 } |
703 } | 701 } |
704 | 702 |
705 } // namespace compiler | 703 } // namespace compiler |
706 } // namespace internal | 704 } // namespace internal |
707 } // namespace v8 | 705 } // namespace v8 |
OLD | NEW |