| 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 outputs[output_count++] = g.DefineAsRegister(node); | 255 if (cont->IsDeoptimize()) { |
| 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 } |
| 256 if (cont->IsSet()) { | 263 if (cont->IsSet()) { |
| 257 outputs[output_count++] = g.DefineAsRegister(cont->result()); | 264 outputs[output_count++] = g.DefineAsRegister(cont->result()); |
| 258 } | 265 } |
| 259 | 266 |
| 260 DCHECK_NE(0u, input_count); | 267 DCHECK_NE(0u, input_count); |
| 261 DCHECK_NE(0u, output_count); | 268 DCHECK_NE(0u, output_count); |
| 262 DCHECK_GE(arraysize(inputs), input_count); | 269 DCHECK_GE(arraysize(inputs), input_count); |
| 263 DCHECK_GE(arraysize(outputs), output_count); | 270 DCHECK_GE(arraysize(outputs), output_count); |
| 264 DCHECK_NE(kMode_None, AddressingModeField::decode(opcode)); | 271 DCHECK_NE(kMode_None, AddressingModeField::decode(opcode)); |
| 265 | 272 |
| (...skipping 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1980 // static | 1987 // static |
| 1981 MachineOperatorBuilder::AlignmentRequirements | 1988 MachineOperatorBuilder::AlignmentRequirements |
| 1982 InstructionSelector::AlignmentRequirements() { | 1989 InstructionSelector::AlignmentRequirements() { |
| 1983 return MachineOperatorBuilder::AlignmentRequirements:: | 1990 return MachineOperatorBuilder::AlignmentRequirements:: |
| 1984 FullUnalignedAccessSupport(); | 1991 FullUnalignedAccessSupport(); |
| 1985 } | 1992 } |
| 1986 | 1993 |
| 1987 } // namespace compiler | 1994 } // namespace compiler |
| 1988 } // namespace internal | 1995 } // namespace internal |
| 1989 } // namespace v8 | 1996 } // namespace v8 |
| OLD | NEW |