| 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/base/bits.h" | 6 #include "src/base/bits.h" |
| 7 #include "src/compiler/instruction-selector-impl.h" | 7 #include "src/compiler/instruction-selector-impl.h" |
| 8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
| 9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
| 10 | 10 |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 opcode |= AddressingModeField::encode(kMode_Operand2_R); | 245 opcode |= AddressingModeField::encode(kMode_Operand2_R); |
| 246 inputs[input_count++] = g.UseRegister(m.left().node()); | 246 inputs[input_count++] = g.UseRegister(m.left().node()); |
| 247 inputs[input_count++] = g.UseRegister(m.right().node()); | 247 inputs[input_count++] = g.UseRegister(m.right().node()); |
| 248 } | 248 } |
| 249 | 249 |
| 250 if (cont->IsBranch()) { | 250 if (cont->IsBranch()) { |
| 251 inputs[input_count++] = g.Label(cont->true_block()); | 251 inputs[input_count++] = g.Label(cont->true_block()); |
| 252 inputs[input_count++] = g.Label(cont->false_block()); | 252 inputs[input_count++] = g.Label(cont->false_block()); |
| 253 } | 253 } |
| 254 | 254 |
| 255 if (cont->IsDeoptimize()) { | 255 outputs[output_count++] = g.DefineAsRegister(node); |
| 256 // If we can deoptimize as a result of the binop, we need to make sure that | |
| 257 // the deopt inputs are not overwritten by the binop result. One way | |
| 258 // to achieve that is to declare the output register as same-as-first. | |
| 259 outputs[output_count++] = g.DefineSameAsFirst(node); | |
| 260 } else { | |
| 261 outputs[output_count++] = g.DefineAsRegister(node); | |
| 262 } | |
| 263 if (cont->IsSet()) { | 256 if (cont->IsSet()) { |
| 264 outputs[output_count++] = g.DefineAsRegister(cont->result()); | 257 outputs[output_count++] = g.DefineAsRegister(cont->result()); |
| 265 } | 258 } |
| 266 | 259 |
| 267 DCHECK_NE(0u, input_count); | 260 DCHECK_NE(0u, input_count); |
| 268 DCHECK_NE(0u, output_count); | 261 DCHECK_NE(0u, output_count); |
| 269 DCHECK_GE(arraysize(inputs), input_count); | 262 DCHECK_GE(arraysize(inputs), input_count); |
| 270 DCHECK_GE(arraysize(outputs), output_count); | 263 DCHECK_GE(arraysize(outputs), output_count); |
| 271 DCHECK_NE(kMode_None, AddressingModeField::decode(opcode)); | 264 DCHECK_NE(kMode_None, AddressingModeField::decode(opcode)); |
| 272 | 265 |
| (...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2258 Vector<MachineType> req_aligned = Vector<MachineType>::New(2); | 2251 Vector<MachineType> req_aligned = Vector<MachineType>::New(2); |
| 2259 req_aligned[0] = MachineType::Float32(); | 2252 req_aligned[0] = MachineType::Float32(); |
| 2260 req_aligned[1] = MachineType::Float64(); | 2253 req_aligned[1] = MachineType::Float64(); |
| 2261 return MachineOperatorBuilder::AlignmentRequirements:: | 2254 return MachineOperatorBuilder::AlignmentRequirements:: |
| 2262 SomeUnalignedAccessUnsupported(req_aligned, req_aligned); | 2255 SomeUnalignedAccessUnsupported(req_aligned, req_aligned); |
| 2263 } | 2256 } |
| 2264 | 2257 |
| 2265 } // namespace compiler | 2258 } // namespace compiler |
| 2266 } // namespace internal | 2259 } // namespace internal |
| 2267 } // namespace v8 | 2260 } // namespace v8 |
| OLD | NEW |