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

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

Issue 1919513002: [turbofan] Introduce TruncateTaggedToWord32 simplified operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months 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
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 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 X87OperandGenerator g(this); 837 X87OperandGenerator g(this);
838 Emit(kX87Float64ToUint32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); 838 Emit(kX87Float64ToUint32, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
839 } 839 }
840 840
841 void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) { 841 void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) {
842 X87OperandGenerator g(this); 842 X87OperandGenerator g(this);
843 Emit(kX87Float64ToFloat32, g.DefineAsFixed(node, stX_0), 843 Emit(kX87Float64ToFloat32, g.DefineAsFixed(node, stX_0),
844 g.Use(node->InputAt(0))); 844 g.Use(node->InputAt(0)));
845 } 845 }
846 846
847 847 void InstructionSelector::VisitTruncateFloat64ToWord32(Node* node) {
848 void InstructionSelector::VisitTruncateFloat64ToInt32(Node* node) {
849 X87OperandGenerator g(this); 848 X87OperandGenerator g(this);
850 849
851 switch (TruncationModeOf(node->op())) { 850 switch (TruncationModeOf(node->op())) {
852 case TruncationMode::kJavaScript: 851 case TruncationMode::kJavaScript:
853 Emit(kArchTruncateDoubleToI, g.DefineAsRegister(node), 852 Emit(kArchTruncateDoubleToI, g.DefineAsRegister(node),
854 g.Use(node->InputAt(0))); 853 g.Use(node->InputAt(0)));
855 return; 854 return;
856 case TruncationMode::kRoundToZero: 855 case TruncationMode::kRoundToZero:
857 Emit(kX87Float64ToInt32, g.DefineAsRegister(node), 856 Emit(kX87Float64ToInt32, g.DefineAsRegister(node),
858 g.Use(node->InputAt(0))); 857 g.Use(node->InputAt(0)));
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 MachineOperatorBuilder::kFloat32RoundTruncate | 1618 MachineOperatorBuilder::kFloat32RoundTruncate |
1620 MachineOperatorBuilder::kFloat64RoundTruncate | 1619 MachineOperatorBuilder::kFloat64RoundTruncate |
1621 MachineOperatorBuilder::kFloat32RoundTiesEven | 1620 MachineOperatorBuilder::kFloat32RoundTiesEven |
1622 MachineOperatorBuilder::kFloat64RoundTiesEven; 1621 MachineOperatorBuilder::kFloat64RoundTiesEven;
1623 return flags; 1622 return flags;
1624 } 1623 }
1625 1624
1626 } // namespace compiler 1625 } // namespace compiler
1627 } // namespace internal 1626 } // namespace internal
1628 } // namespace v8 1627 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698