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

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

Issue 1488993002: X87: [turbofan] Added the optional Float64RoundUp operator to turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | no next file » | 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/adapters.h" 5 #include "src/base/adapters.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 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 void InstructionSelector::VisitFloat64RoundDown(Node* node) { 848 void InstructionSelector::VisitFloat64RoundDown(Node* node) {
849 X87OperandGenerator g(this); 849 X87OperandGenerator g(this);
850 Emit(kX87Float64Round | MiscField::encode(kRoundDown), 850 Emit(kX87Float64Round | MiscField::encode(kRoundDown),
851 g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); 851 g.UseFixed(node, stX_0), g.Use(node->InputAt(0)));
852 } 852 }
853 853
854 854
855 void InstructionSelector::VisitFloat32RoundUp(Node* node) { UNREACHABLE(); } 855 void InstructionSelector::VisitFloat32RoundUp(Node* node) { UNREACHABLE(); }
856 856
857 857
858 void InstructionSelector::VisitFloat64RoundUp(Node* node) { UNREACHABLE(); } 858 void InstructionSelector::VisitFloat64RoundUp(Node* node) {
859 X87OperandGenerator g(this);
860 Emit(kX87Float64Round | MiscField::encode(kRoundUp), g.UseFixed(node, stX_0),
861 g.Use(node->InputAt(0)));
862 }
859 863
860 864
861 void InstructionSelector::VisitFloat32RoundTruncate(Node* node) { 865 void InstructionSelector::VisitFloat32RoundTruncate(Node* node) {
862 UNREACHABLE(); 866 UNREACHABLE();
863 } 867 }
864 868
865 869
866 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { 870 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) {
867 X87OperandGenerator g(this); 871 X87OperandGenerator g(this);
868 Emit(kX87Float64Round | MiscField::encode(kRoundToZero), 872 Emit(kX87Float64Round | MiscField::encode(kRoundToZero),
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
1295 MachineOperatorBuilder::kFloat32Max | 1299 MachineOperatorBuilder::kFloat32Max |
1296 MachineOperatorBuilder::kFloat32Min | 1300 MachineOperatorBuilder::kFloat32Min |
1297 MachineOperatorBuilder::kFloat64Max | 1301 MachineOperatorBuilder::kFloat64Max |
1298 MachineOperatorBuilder::kFloat64Min | 1302 MachineOperatorBuilder::kFloat64Min |
1299 MachineOperatorBuilder::kWord32ShiftIsSafe; 1303 MachineOperatorBuilder::kWord32ShiftIsSafe;
1300 if (CpuFeatures::IsSupported(POPCNT)) { 1304 if (CpuFeatures::IsSupported(POPCNT)) {
1301 flags |= MachineOperatorBuilder::kWord32Popcnt; 1305 flags |= MachineOperatorBuilder::kWord32Popcnt;
1302 } 1306 }
1303 1307
1304 flags |= MachineOperatorBuilder::kFloat64RoundDown | 1308 flags |= MachineOperatorBuilder::kFloat64RoundDown |
1309 MachineOperatorBuilder::kFloat64RoundUp |
1305 MachineOperatorBuilder::kFloat64RoundTruncate; 1310 MachineOperatorBuilder::kFloat64RoundTruncate;
1306 return flags; 1311 return flags;
1307 } 1312 }
1308 1313
1309 } // namespace compiler 1314 } // namespace compiler
1310 } // namespace internal 1315 } // namespace internal
1311 } // namespace v8 1316 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698