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

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

Issue 1477753002: [turbofan] Implemented the optional Float32RoundTiesEven operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@f32trunc
Patch Set: Merging with the changed codebase Created 5 years 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/verifier.cc ('k') | src/compiler/x87/instruction-selector-x87.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 <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 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { 1166 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) {
1167 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToZero)); 1167 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToZero));
1168 } 1168 }
1169 1169
1170 1170
1171 void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) { 1171 void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) {
1172 UNREACHABLE(); 1172 UNREACHABLE();
1173 } 1173 }
1174 1174
1175 1175
1176 void InstructionSelector::VisitFloat32RoundTiesEven(Node* node) {
1177 VisitRR(this, node, kSSEFloat32Round | MiscField::encode(kRoundToNearest));
1178 }
1179
1180
1176 void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) { 1181 void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) {
1177 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToNearest)); 1182 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToNearest));
1178 } 1183 }
1179 1184
1180 1185
1181 void InstructionSelector::EmitPrepareArguments(NodeVector* arguments, 1186 void InstructionSelector::EmitPrepareArguments(NodeVector* arguments,
1182 const CallDescriptor* descriptor, 1187 const CallDescriptor* descriptor,
1183 Node* node) { 1188 Node* node) {
1184 X64OperandGenerator g(this); 1189 X64OperandGenerator g(this);
1185 1190
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 flags |= MachineOperatorBuilder::kWord32Popcnt | 1710 flags |= MachineOperatorBuilder::kWord32Popcnt |
1706 MachineOperatorBuilder::kWord64Popcnt; 1711 MachineOperatorBuilder::kWord64Popcnt;
1707 } 1712 }
1708 if (CpuFeatures::IsSupported(SSE4_1)) { 1713 if (CpuFeatures::IsSupported(SSE4_1)) {
1709 flags |= MachineOperatorBuilder::kFloat32RoundDown | 1714 flags |= MachineOperatorBuilder::kFloat32RoundDown |
1710 MachineOperatorBuilder::kFloat64RoundDown | 1715 MachineOperatorBuilder::kFloat64RoundDown |
1711 MachineOperatorBuilder::kFloat32RoundUp | 1716 MachineOperatorBuilder::kFloat32RoundUp |
1712 MachineOperatorBuilder::kFloat64RoundUp | 1717 MachineOperatorBuilder::kFloat64RoundUp |
1713 MachineOperatorBuilder::kFloat32RoundTruncate | 1718 MachineOperatorBuilder::kFloat32RoundTruncate |
1714 MachineOperatorBuilder::kFloat64RoundTruncate | 1719 MachineOperatorBuilder::kFloat64RoundTruncate |
1720 MachineOperatorBuilder::kFloat32RoundTiesEven |
1715 MachineOperatorBuilder::kFloat64RoundTiesEven; 1721 MachineOperatorBuilder::kFloat64RoundTiesEven;
1716 } 1722 }
1717 return flags; 1723 return flags;
1718 } 1724 }
1719 1725
1720 } // namespace compiler 1726 } // namespace compiler
1721 } // namespace internal 1727 } // namespace internal
1722 } // namespace v8 1728 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/verifier.cc ('k') | src/compiler/x87/instruction-selector-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698