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

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

Issue 1413463009: Implemented the Word64Clz TurboFan operator for x64, arm64, and mips64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed a typing problem, and added mips64. Created 5 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
« no previous file with comments | « src/compiler/x64/instruction-codes-x64.h ('k') | src/mips64/assembler-mips64.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 <algorithm> 5 #include <algorithm>
6 6
7 #include "src/base/adapters.h" 7 #include "src/base/adapters.h"
8 #include "src/compiler/instruction-selector-impl.h" 8 #include "src/compiler/instruction-selector-impl.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 void InstructionSelector::VisitWord32Ror(Node* node) { 565 void InstructionSelector::VisitWord32Ror(Node* node) {
566 VisitWord32Shift(this, node, kX64Ror32); 566 VisitWord32Shift(this, node, kX64Ror32);
567 } 567 }
568 568
569 569
570 void InstructionSelector::VisitWord64Ror(Node* node) { 570 void InstructionSelector::VisitWord64Ror(Node* node) {
571 VisitWord64Shift(this, node, kX64Ror); 571 VisitWord64Shift(this, node, kX64Ror);
572 } 572 }
573 573
574 574
575 void InstructionSelector::VisitWord64Clz(Node* node) {
576 X64OperandGenerator g(this);
577 Emit(kX64Lzcnt, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
578 }
579
580
575 void InstructionSelector::VisitWord32Clz(Node* node) { 581 void InstructionSelector::VisitWord32Clz(Node* node) {
576 X64OperandGenerator g(this); 582 X64OperandGenerator g(this);
577 Emit(kX64Lzcnt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); 583 Emit(kX64Lzcnt32, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
578 } 584 }
579 585
580 586
581 void InstructionSelector::VisitWord32Ctz(Node* node) { 587 void InstructionSelector::VisitWord32Ctz(Node* node) {
582 X64OperandGenerator g(this); 588 X64OperandGenerator g(this);
583 Emit(kX64Tzcnt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); 589 Emit(kX64Tzcnt32, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
584 } 590 }
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1607 if (CpuFeatures::IsSupported(SSE4_1)) { 1613 if (CpuFeatures::IsSupported(SSE4_1)) {
1608 flags |= MachineOperatorBuilder::kFloat64RoundDown | 1614 flags |= MachineOperatorBuilder::kFloat64RoundDown |
1609 MachineOperatorBuilder::kFloat64RoundTruncate; 1615 MachineOperatorBuilder::kFloat64RoundTruncate;
1610 } 1616 }
1611 return flags; 1617 return flags;
1612 } 1618 }
1613 1619
1614 } // namespace compiler 1620 } // namespace compiler
1615 } // namespace internal 1621 } // namespace internal
1616 } // namespace v8 1622 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/instruction-codes-x64.h ('k') | src/mips64/assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698