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

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

Issue 1490113003: X87: [turbofan] Implemented the optional Float32RoundDown operator. (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 | « src/compiler/x87/instruction-codes-x87.h ('k') | 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 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 } 835 }
836 836
837 837
838 void InstructionSelector::VisitFloat64Sqrt(Node* node) { 838 void InstructionSelector::VisitFloat64Sqrt(Node* node) {
839 X87OperandGenerator g(this); 839 X87OperandGenerator g(this);
840 Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); 840 Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0)));
841 Emit(kX87Float64Sqrt, g.DefineAsFixed(node, stX_0), 0, NULL); 841 Emit(kX87Float64Sqrt, g.DefineAsFixed(node, stX_0), 0, NULL);
842 } 842 }
843 843
844 844
845 void InstructionSelector::VisitFloat32RoundDown(Node* node) { UNIMPLEMENTED(); } 845 void InstructionSelector::VisitFloat32RoundDown(Node* node) {
846 X87OperandGenerator g(this);
847 Emit(kX87Float32Round | MiscField::encode(kRoundDown),
848 g.UseFixed(node, stX_0), g.Use(node->InputAt(0)));
849 }
846 850
847 851
848 void InstructionSelector::VisitFloat64RoundDown(Node* node) { 852 void InstructionSelector::VisitFloat64RoundDown(Node* node) {
849 X87OperandGenerator g(this); 853 X87OperandGenerator g(this);
850 Emit(kX87Float64Round | MiscField::encode(kRoundDown), 854 Emit(kX87Float64Round | MiscField::encode(kRoundDown),
851 g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); 855 g.UseFixed(node, stX_0), g.Use(node->InputAt(0)));
852 } 856 }
853 857
854 858
855 void InstructionSelector::VisitFloat32RoundUp(Node* node) { UNREACHABLE(); } 859 void InstructionSelector::VisitFloat32RoundUp(Node* node) { UNREACHABLE(); }
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 MachineOperatorBuilder::kFloat64Max | 1307 MachineOperatorBuilder::kFloat64Max |
1304 MachineOperatorBuilder::kFloat64Min | 1308 MachineOperatorBuilder::kFloat64Min |
1305 MachineOperatorBuilder::kWord32ShiftIsSafe; 1309 MachineOperatorBuilder::kWord32ShiftIsSafe;
1306 if (CpuFeatures::IsSupported(POPCNT)) { 1310 if (CpuFeatures::IsSupported(POPCNT)) {
1307 flags |= MachineOperatorBuilder::kWord32Popcnt; 1311 flags |= MachineOperatorBuilder::kWord32Popcnt;
1308 } 1312 }
1309 1313
1310 flags |= MachineOperatorBuilder::kFloat64RoundDown | 1314 flags |= MachineOperatorBuilder::kFloat64RoundDown |
1311 MachineOperatorBuilder::kFloat64RoundUp | 1315 MachineOperatorBuilder::kFloat64RoundUp |
1312 MachineOperatorBuilder::kFloat64RoundTruncate | 1316 MachineOperatorBuilder::kFloat64RoundTruncate |
1313 MachineOperatorBuilder::kFloat64RoundTiesEven; 1317 MachineOperatorBuilder::kFloat64RoundTiesEven |
1318 MachineOperatorBuilder::kFloat32RoundDown;
1314 return flags; 1319 return flags;
1315 } 1320 }
1316 1321
1317 } // namespace compiler 1322 } // namespace compiler
1318 } // namespace internal 1323 } // namespace internal
1319 } // namespace v8 1324 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x87/instruction-codes-x87.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698