| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 Int32BinopMatcher m(node); | 262 Int32BinopMatcher m(node); |
| 263 InstructionOperand inputs[4]; | 263 InstructionOperand inputs[4]; |
| 264 size_t input_count = 0; | 264 size_t input_count = 0; |
| 265 InstructionOperand outputs[2]; | 265 InstructionOperand outputs[2]; |
| 266 size_t output_count = 0; | 266 size_t output_count = 0; |
| 267 | 267 |
| 268 if (TryMatchImmediate(selector, &opcode, m.right().node(), &input_count, | 268 if (TryMatchImmediate(selector, &opcode, m.right().node(), &input_count, |
| 269 &inputs[1])) { | 269 &inputs[1])) { |
| 270 inputs[0] = g.UseRegister(m.left().node()); | 270 inputs[0] = g.UseRegister(m.left().node()); |
| 271 input_count++; | 271 input_count++; |
| 272 } | 272 } else if (has_reverse_opcode && |
| 273 if (has_reverse_opcode && | 273 TryMatchImmediate(selector, &reverse_opcode, m.left().node(), |
| 274 TryMatchImmediate(selector, &reverse_opcode, m.left().node(), | 274 &input_count, &inputs[1])) { |
| 275 &input_count, &inputs[1])) { | |
| 276 inputs[0] = g.UseRegister(m.right().node()); | 275 inputs[0] = g.UseRegister(m.right().node()); |
| 277 opcode = reverse_opcode; | 276 opcode = reverse_opcode; |
| 278 input_count++; | 277 input_count++; |
| 279 } else { | 278 } else { |
| 280 inputs[input_count++] = g.UseRegister(m.left().node()); | 279 inputs[input_count++] = g.UseRegister(m.left().node()); |
| 281 inputs[input_count++] = g.UseOperand(m.right().node(), opcode); | 280 inputs[input_count++] = g.UseOperand(m.right().node(), opcode); |
| 282 } | 281 } |
| 283 | 282 |
| 284 if (cont->IsBranch()) { | 283 if (cont->IsBranch()) { |
| 285 inputs[input_count++] = g.Label(cont->true_block()); | 284 inputs[input_count++] = g.Label(cont->true_block()); |
| (...skipping 2355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2641 } else { | 2640 } else { |
| 2642 DCHECK(kArchVariant == kMips64r2); | 2641 DCHECK(kArchVariant == kMips64r2); |
| 2643 return MachineOperatorBuilder::AlignmentRequirements:: | 2642 return MachineOperatorBuilder::AlignmentRequirements:: |
| 2644 NoUnalignedAccessSupport(); | 2643 NoUnalignedAccessSupport(); |
| 2645 } | 2644 } |
| 2646 } | 2645 } |
| 2647 | 2646 |
| 2648 } // namespace compiler | 2647 } // namespace compiler |
| 2649 } // namespace internal | 2648 } // namespace internal |
| 2650 } // namespace v8 | 2649 } // namespace v8 |
| OLD | NEW |