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/x87/instruction-selector-x87.cc

Issue 1583323004: [turbofan] Add the TruncateFloat32ToInt32 operator to turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed a small bug Created 4 years, 11 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
« no previous file with comments | « src/compiler/x87/instruction-codes-x87.h ('k') | src/x64/assembler-x64.h » ('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 "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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 } 662 }
663 663
664 664
665 void InstructionSelector::VisitChangeUint32ToFloat64(Node* node) { 665 void InstructionSelector::VisitChangeUint32ToFloat64(Node* node) {
666 X87OperandGenerator g(this); 666 X87OperandGenerator g(this);
667 Emit(kX87Uint32ToFloat64, g.DefineAsFixed(node, stX_0), 667 Emit(kX87Uint32ToFloat64, g.DefineAsFixed(node, stX_0),
668 g.UseRegister(node->InputAt(0))); 668 g.UseRegister(node->InputAt(0)));
669 } 669 }
670 670
671 671
672 void InstructionSelector::VisitTruncateFloat32ToInt32(Node* node) {
673 X87OperandGenerator g(this);
674 Emit(kX87Float32ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
675 }
676
677
672 void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { 678 void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) {
673 X87OperandGenerator g(this); 679 X87OperandGenerator g(this);
674 Emit(kX87Float64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); 680 Emit(kX87Float64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
675 } 681 }
676 682
677 683
678 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { 684 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) {
679 X87OperandGenerator g(this); 685 X87OperandGenerator g(this);
680 Emit(kX87Float64ToUint32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); 686 Emit(kX87Float64ToUint32, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
681 } 687 }
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 MachineOperatorBuilder::kFloat32RoundTruncate | 1342 MachineOperatorBuilder::kFloat32RoundTruncate |
1337 MachineOperatorBuilder::kFloat64RoundTruncate | 1343 MachineOperatorBuilder::kFloat64RoundTruncate |
1338 MachineOperatorBuilder::kFloat32RoundTiesEven | 1344 MachineOperatorBuilder::kFloat32RoundTiesEven |
1339 MachineOperatorBuilder::kFloat64RoundTiesEven; 1345 MachineOperatorBuilder::kFloat64RoundTiesEven;
1340 return flags; 1346 return flags;
1341 } 1347 }
1342 1348
1343 } // namespace compiler 1349 } // namespace compiler
1344 } // namespace internal 1350 } // namespace internal
1345 } // namespace v8 1351 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x87/instruction-codes-x87.h ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698