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 2052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2063 for (int i = 0; i < config()->num_allocatable_double_registers(); ++i) { | 2063 for (int i = 0; i < config()->num_allocatable_double_registers(); ++i) { |
2064 int code = config()->GetAllocatableDoubleCode(i); | 2064 int code = config()->GetAllocatableDoubleCode(i); |
2065 if (!IsOutputFPRegisterOf(instr, MachineRepresentation::kFloat64, | 2065 if (!IsOutputFPRegisterOf(instr, MachineRepresentation::kFloat64, |
2066 code)) { | 2066 code)) { |
2067 TopLevelLiveRange* range = | 2067 TopLevelLiveRange* range = |
2068 FixedFPLiveRangeFor(code, MachineRepresentation::kFloat64); | 2068 FixedFPLiveRangeFor(code, MachineRepresentation::kFloat64); |
2069 range->AddUseInterval(curr_position, curr_position.End(), | 2069 range->AddUseInterval(curr_position, curr_position.End(), |
2070 allocation_zone()); | 2070 allocation_zone()); |
2071 } | 2071 } |
2072 } | 2072 } |
2073 for (int i = 0; i < config()->num_allocatable_float_registers(); ++i) { | 2073 // Preserve fixed float registers on archs with non-simple aliasing. |
2074 int code = config()->GetAllocatableFloatCode(i); | 2074 if (!kSimpleFPAliasing) { |
2075 if (!IsOutputFPRegisterOf(instr, MachineRepresentation::kFloat32, | 2075 for (int i = 0; i < config()->num_allocatable_float_registers(); ++i) { |
2076 code)) { | 2076 int code = config()->GetAllocatableFloatCode(i); |
2077 TopLevelLiveRange* range = | 2077 if (!IsOutputFPRegisterOf(instr, MachineRepresentation::kFloat32, |
2078 FixedFPLiveRangeFor(code, MachineRepresentation::kFloat32); | 2078 code)) { |
2079 range->AddUseInterval(curr_position, curr_position.End(), | 2079 TopLevelLiveRange* range = |
2080 allocation_zone()); | 2080 FixedFPLiveRangeFor(code, MachineRepresentation::kFloat32); |
| 2081 range->AddUseInterval(curr_position, curr_position.End(), |
| 2082 allocation_zone()); |
| 2083 } |
2081 } | 2084 } |
2082 } | 2085 } |
2083 } | 2086 } |
2084 | 2087 |
2085 for (size_t i = 0; i < instr->InputCount(); i++) { | 2088 for (size_t i = 0; i < instr->InputCount(); i++) { |
2086 InstructionOperand* input = instr->InputAt(i); | 2089 InstructionOperand* input = instr->InputAt(i); |
2087 if (input->IsImmediate() || input->IsExplicit()) { | 2090 if (input->IsImmediate() || input->IsExplicit()) { |
2088 continue; // Ignore immediates and explicitly reserved registers. | 2091 continue; // Ignore immediates and explicitly reserved registers. |
2089 } | 2092 } |
2090 LifetimePosition use_pos; | 2093 LifetimePosition use_pos; |
(...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3766 } | 3769 } |
3767 } | 3770 } |
3768 } | 3771 } |
3769 } | 3772 } |
3770 } | 3773 } |
3771 | 3774 |
3772 | 3775 |
3773 } // namespace compiler | 3776 } // namespace compiler |
3774 } // namespace internal | 3777 } // namespace internal |
3775 } // namespace v8 | 3778 } // namespace v8 |
OLD | NEW |