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/base/adapters.h" | 5 #include "src/base/adapters.h" |
6 #include "src/compiler/linkage.h" | 6 #include "src/compiler/linkage.h" |
7 #include "src/compiler/register-allocator.h" | 7 #include "src/compiler/register-allocator.h" |
8 #include "src/string-stream.h" | 8 #include "src/string-stream.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1235 UnallocatedOperand* operand, int pos, bool is_tagged) { | 1235 UnallocatedOperand* operand, int pos, bool is_tagged) { |
1236 TRACE("Allocating fixed reg for op %d\n", operand->virtual_register()); | 1236 TRACE("Allocating fixed reg for op %d\n", operand->virtual_register()); |
1237 DCHECK(operand->HasFixedPolicy()); | 1237 DCHECK(operand->HasFixedPolicy()); |
1238 InstructionOperand allocated; | 1238 InstructionOperand allocated; |
1239 MachineType machine_type = InstructionSequence::DefaultRepresentation(); | 1239 MachineType machine_type = InstructionSequence::DefaultRepresentation(); |
1240 int virtual_register = operand->virtual_register(); | 1240 int virtual_register = operand->virtual_register(); |
1241 if (virtual_register != InstructionOperand::kInvalidVirtualRegister) { | 1241 if (virtual_register != InstructionOperand::kInvalidVirtualRegister) { |
1242 machine_type = data()->MachineTypeFor(virtual_register); | 1242 machine_type = data()->MachineTypeFor(virtual_register); |
1243 } | 1243 } |
1244 if (operand->HasFixedSlotPolicy()) { | 1244 if (operand->HasFixedSlotPolicy()) { |
1245 AllocatedOperand::AllocatedKind kind = | 1245 allocated = AllocatedOperand(AllocatedOperand::STACK_SLOT, machine_type, |
1246 IsFloatingPoint(machine_type) ? AllocatedOperand::DOUBLE_STACK_SLOT | 1246 operand->fixed_slot_index()); |
1247 : AllocatedOperand::STACK_SLOT; | |
1248 allocated = | |
1249 AllocatedOperand(kind, machine_type, operand->fixed_slot_index()); | |
1250 } else if (operand->HasFixedRegisterPolicy()) { | 1247 } else if (operand->HasFixedRegisterPolicy()) { |
1251 allocated = AllocatedOperand(AllocatedOperand::REGISTER, machine_type, | 1248 allocated = AllocatedOperand(AllocatedOperand::REGISTER, machine_type, |
1252 operand->fixed_register_index()); | 1249 operand->fixed_register_index()); |
1253 } else if (operand->HasFixedDoubleRegisterPolicy()) { | 1250 } else if (operand->HasFixedDoubleRegisterPolicy()) { |
1254 DCHECK_NE(InstructionOperand::kInvalidVirtualRegister, virtual_register); | 1251 DCHECK_NE(InstructionOperand::kInvalidVirtualRegister, virtual_register); |
1255 allocated = AllocatedOperand(AllocatedOperand::DOUBLE_REGISTER, | 1252 allocated = AllocatedOperand(AllocatedOperand::DOUBLE_REGISTER, |
1256 machine_type, operand->fixed_register_index()); | 1253 machine_type, operand->fixed_register_index()); |
1257 } else { | 1254 } else { |
1258 UNREACHABLE(); | 1255 UNREACHABLE(); |
1259 } | 1256 } |
(...skipping 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3056 auto eliminate = moves->PrepareInsertAfter(move); | 3053 auto eliminate = moves->PrepareInsertAfter(move); |
3057 to_insert.push_back(move); | 3054 to_insert.push_back(move); |
3058 if (eliminate != nullptr) to_eliminate.push_back(eliminate); | 3055 if (eliminate != nullptr) to_eliminate.push_back(eliminate); |
3059 } | 3056 } |
3060 } | 3057 } |
3061 | 3058 |
3062 | 3059 |
3063 } // namespace compiler | 3060 } // namespace compiler |
3064 } // namespace internal | 3061 } // namespace internal |
3065 } // namespace v8 | 3062 } // namespace v8 |
OLD | NEW |