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

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

Issue 654833002: [turbofan] Optimize division/modulus by constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 months 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/arm64/instruction-codes-arm64.h ('k') | src/compiler/ia32/code-generator-ia32.cc » ('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/compiler/instruction-selector-impl.h" 5 #include "src/compiler/instruction-selector-impl.h"
6 #include "src/compiler/node-matchers.h" 6 #include "src/compiler/node-matchers.h"
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 namespace compiler { 10 namespace compiler {
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 Emit(kArm64Mneg, g.DefineAsRegister(node), g.UseRegister(m.left().node()), 739 Emit(kArm64Mneg, g.DefineAsRegister(node), g.UseRegister(m.left().node()),
740 g.UseRegister(mright.right().node())); 740 g.UseRegister(mright.right().node()));
741 return; 741 return;
742 } 742 }
743 } 743 }
744 744
745 VisitRRR(this, kArm64Mul, node); 745 VisitRRR(this, kArm64Mul, node);
746 } 746 }
747 747
748 748
749 void InstructionSelector::VisitInt32MulHigh(Node* node) {
750 // TODO(arm64): Can we do better here?
751 Arm64OperandGenerator g(this);
752 InstructionOperand* const smull_operand = g.TempRegister();
753 Emit(kArm64Smull, smull_operand, g.UseRegister(node->InputAt(0)),
754 g.UseRegister(node->InputAt(1)));
755 Emit(kArm64Asr, g.DefineAsRegister(node), smull_operand, g.TempImmediate(32));
756 }
757
758
749 void InstructionSelector::VisitInt32Div(Node* node) { 759 void InstructionSelector::VisitInt32Div(Node* node) {
750 VisitRRR(this, kArm64Idiv32, node); 760 VisitRRR(this, kArm64Idiv32, node);
751 } 761 }
752 762
753 763
754 void InstructionSelector::VisitInt64Div(Node* node) { 764 void InstructionSelector::VisitInt64Div(Node* node) {
755 VisitRRR(this, kArm64Idiv, node); 765 VisitRRR(this, kArm64Idiv, node);
756 } 766 }
757 767
758 768
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 1279
1270 1280
1271 void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { 1281 void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) {
1272 FlagsContinuation cont(kUnorderedLessThanOrEqual, node); 1282 FlagsContinuation cont(kUnorderedLessThanOrEqual, node);
1273 VisitFloat64Compare(this, node, &cont); 1283 VisitFloat64Compare(this, node, &cont);
1274 } 1284 }
1275 1285
1276 } // namespace compiler 1286 } // namespace compiler
1277 } // namespace internal 1287 } // namespace internal
1278 } // namespace v8 1288 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm64/instruction-codes-arm64.h ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698