Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: src/compiler/mips/instruction-selector-mips.cc

Issue 701543002: MIPS: [turbofan] Also optimize unsigned division by constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/mips/instruction-codes-mips.h ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-codes-mips.h ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698