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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "src/base/adapters.h" | 7 #include "src/base/adapters.h" |
8 #include "src/compiler/instruction-selector-impl.h" | 8 #include "src/compiler/instruction-selector-impl.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 InstructionOperand inputs[3]; | 182 InstructionOperand inputs[3]; |
183 size_t input_count = 0; | 183 size_t input_count = 0; |
184 inputs[input_count++] = g.UseUniqueRegister(base); | 184 inputs[input_count++] = g.UseUniqueRegister(base); |
185 if (g.CanBeImmediate(index)) { | 185 if (g.CanBeImmediate(index)) { |
186 inputs[input_count++] = g.UseImmediate(index); | 186 inputs[input_count++] = g.UseImmediate(index); |
187 addressing_mode = kMode_MRI; | 187 addressing_mode = kMode_MRI; |
188 } else { | 188 } else { |
189 inputs[input_count++] = g.UseUniqueRegister(index); | 189 inputs[input_count++] = g.UseUniqueRegister(index); |
190 addressing_mode = kMode_MR1; | 190 addressing_mode = kMode_MR1; |
191 } | 191 } |
192 inputs[input_count++] = (write_barrier_kind == kMapWriteBarrier) | 192 inputs[input_count++] = g.UseUniqueRegister(value); |
193 ? g.UseRegister(value) | |
194 : g.UseUniqueRegister(value); | |
195 RecordWriteMode record_write_mode = RecordWriteMode::kValueIsAny; | 193 RecordWriteMode record_write_mode = RecordWriteMode::kValueIsAny; |
196 switch (write_barrier_kind) { | 194 switch (write_barrier_kind) { |
197 case kNoWriteBarrier: | 195 case kNoWriteBarrier: |
198 UNREACHABLE(); | 196 UNREACHABLE(); |
199 break; | 197 break; |
200 case kMapWriteBarrier: | 198 case kMapWriteBarrier: |
201 record_write_mode = RecordWriteMode::kValueIsMap; | 199 record_write_mode = RecordWriteMode::kValueIsMap; |
202 break; | 200 break; |
203 case kPointerWriteBarrier: | 201 case kPointerWriteBarrier: |
204 record_write_mode = RecordWriteMode::kValueIsPointer; | 202 record_write_mode = RecordWriteMode::kValueIsPointer; |
(...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1929 MachineOperatorBuilder::kFloat64RoundTruncate | | 1927 MachineOperatorBuilder::kFloat64RoundTruncate | |
1930 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1928 MachineOperatorBuilder::kFloat32RoundTiesEven | |
1931 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1929 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1932 } | 1930 } |
1933 return flags; | 1931 return flags; |
1934 } | 1932 } |
1935 | 1933 |
1936 } // namespace compiler | 1934 } // namespace compiler |
1937 } // namespace internal | 1935 } // namespace internal |
1938 } // namespace v8 | 1936 } // namespace v8 |
OLD | NEW |