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/bits.h" | 5 #include "src/base/bits.h" |
6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 } | 300 } |
301 | 301 |
302 | 302 |
303 void InstructionSelector::VisitInt32MulHigh(Node* node) { | 303 void InstructionSelector::VisitInt32MulHigh(Node* node) { |
304 MipsOperandGenerator g(this); | 304 MipsOperandGenerator g(this); |
305 Emit(kMipsMulHigh, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), | 305 Emit(kMipsMulHigh, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), |
306 g.UseRegister(node->InputAt(1))); | 306 g.UseRegister(node->InputAt(1))); |
307 } | 307 } |
308 | 308 |
309 | 309 |
| 310 void InstructionSelector::VisitUint32MulHigh(Node* node) { |
| 311 MipsOperandGenerator g(this); |
| 312 Emit(kMipsMulHighU, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), |
| 313 g.UseRegister(node->InputAt(1))); |
| 314 } |
| 315 |
| 316 |
310 void InstructionSelector::VisitInt32Div(Node* node) { | 317 void InstructionSelector::VisitInt32Div(Node* node) { |
311 MipsOperandGenerator g(this); | 318 MipsOperandGenerator g(this); |
312 Int32BinopMatcher m(node); | 319 Int32BinopMatcher m(node); |
313 Emit(kMipsDiv, g.DefineAsRegister(node), g.UseRegister(m.left().node()), | 320 Emit(kMipsDiv, g.DefineAsRegister(node), g.UseRegister(m.left().node()), |
314 g.UseRegister(m.right().node())); | 321 g.UseRegister(m.right().node())); |
315 } | 322 } |
316 | 323 |
317 | 324 |
318 void InstructionSelector::VisitUint32Div(Node* node) { | 325 void InstructionSelector::VisitUint32Div(Node* node) { |
319 MipsOperandGenerator g(this); | 326 MipsOperandGenerator g(this); |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 InstructionSelector::SupportedMachineOperatorFlags() { | 676 InstructionSelector::SupportedMachineOperatorFlags() { |
670 return MachineOperatorBuilder::kInt32DivIsSafe | | 677 return MachineOperatorBuilder::kInt32DivIsSafe | |
671 MachineOperatorBuilder::kInt32ModIsSafe | | 678 MachineOperatorBuilder::kInt32ModIsSafe | |
672 MachineOperatorBuilder::kUint32DivIsSafe | | 679 MachineOperatorBuilder::kUint32DivIsSafe | |
673 MachineOperatorBuilder::kUint32ModIsSafe; | 680 MachineOperatorBuilder::kUint32ModIsSafe; |
674 } | 681 } |
675 | 682 |
676 } // namespace compiler | 683 } // namespace compiler |
677 } // namespace internal | 684 } // namespace internal |
678 } // namespace v8 | 685 } // namespace v8 |
OLD | NEW |