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

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

Issue 1468303005: [turbofan] Implemented the optional Float32RoundTruncate operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@f32roundup
Patch Set: Apparently std::nearbyint does not exist on all platforms. 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 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 void InstructionSelector::VisitFloat32RoundUp(Node* node) { 1151 void InstructionSelector::VisitFloat32RoundUp(Node* node) {
1152 VisitRR(this, node, kSSEFloat32Round | MiscField::encode(kRoundUp)); 1152 VisitRR(this, node, kSSEFloat32Round | MiscField::encode(kRoundUp));
1153 } 1153 }
1154 1154
1155 1155
1156 void InstructionSelector::VisitFloat64RoundUp(Node* node) { 1156 void InstructionSelector::VisitFloat64RoundUp(Node* node) {
1157 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundUp)); 1157 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundUp));
1158 } 1158 }
1159 1159
1160 1160
1161 void InstructionSelector::VisitFloat32RoundTruncate(Node* node) {
1162 VisitRR(this, node, kSSEFloat32Round | MiscField::encode(kRoundToZero));
1163 }
1164
1165
1161 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { 1166 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) {
1162 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToZero)); 1167 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToZero));
1163 } 1168 }
1164 1169
1165 1170
1166 void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) { 1171 void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) {
1167 UNREACHABLE(); 1172 UNREACHABLE();
1168 } 1173 }
1169 1174
1170 1175
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz; 1703 MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz;
1699 if (CpuFeatures::IsSupported(POPCNT)) { 1704 if (CpuFeatures::IsSupported(POPCNT)) {
1700 flags |= MachineOperatorBuilder::kWord32Popcnt | 1705 flags |= MachineOperatorBuilder::kWord32Popcnt |
1701 MachineOperatorBuilder::kWord64Popcnt; 1706 MachineOperatorBuilder::kWord64Popcnt;
1702 } 1707 }
1703 if (CpuFeatures::IsSupported(SSE4_1)) { 1708 if (CpuFeatures::IsSupported(SSE4_1)) {
1704 flags |= MachineOperatorBuilder::kFloat32RoundDown | 1709 flags |= MachineOperatorBuilder::kFloat32RoundDown |
1705 MachineOperatorBuilder::kFloat64RoundDown | 1710 MachineOperatorBuilder::kFloat64RoundDown |
1706 MachineOperatorBuilder::kFloat32RoundUp | 1711 MachineOperatorBuilder::kFloat32RoundUp |
1707 MachineOperatorBuilder::kFloat64RoundUp | 1712 MachineOperatorBuilder::kFloat64RoundUp |
1713 MachineOperatorBuilder::kFloat32RoundTruncate |
1708 MachineOperatorBuilder::kFloat64RoundTruncate | 1714 MachineOperatorBuilder::kFloat64RoundTruncate |
1709 MachineOperatorBuilder::kFloat64RoundTiesEven; 1715 MachineOperatorBuilder::kFloat64RoundTiesEven;
1710 } 1716 }
1711 return flags; 1717 return flags;
1712 } 1718 }
1713 1719
1714 } // namespace compiler 1720 } // namespace compiler
1715 } // namespace internal 1721 } // namespace internal
1716 } // namespace v8 1722 } // 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