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

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

Issue 1435603003: Implemented the RoundInt64ToFloat32 TurboFan operator for x64, arm64, and mips64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/x64/instruction-codes-x64.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 <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 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 break; 923 break;
924 } 924 }
925 default: 925 default:
926 break; 926 break;
927 } 927 }
928 } 928 }
929 Emit(kX64Movl, g.DefineAsRegister(node), g.Use(value)); 929 Emit(kX64Movl, g.DefineAsRegister(node), g.Use(value));
930 } 930 }
931 931
932 932
933 void InstructionSelector::VisitRoundInt64ToFloat32(Node* node) {
934 X64OperandGenerator g(this);
935 Emit(kSSEInt64ToFloat32, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
936 }
937
938
933 void InstructionSelector::VisitRoundInt64ToFloat64(Node* node) { 939 void InstructionSelector::VisitRoundInt64ToFloat64(Node* node) {
934 X64OperandGenerator g(this); 940 X64OperandGenerator g(this);
935 Emit(kSSEInt64ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0))); 941 Emit(kSSEInt64ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
936 } 942 }
937 943
938 944
939 void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) { 945 void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) {
940 X64OperandGenerator g(this); 946 X64OperandGenerator g(this);
941 Emit(kX64BitcastFI, g.DefineAsRegister(node), g.Use(node->InputAt(0))); 947 Emit(kX64BitcastFI, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
942 } 948 }
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 if (CpuFeatures::IsSupported(SSE4_1)) { 1625 if (CpuFeatures::IsSupported(SSE4_1)) {
1620 flags |= MachineOperatorBuilder::kFloat64RoundDown | 1626 flags |= MachineOperatorBuilder::kFloat64RoundDown |
1621 MachineOperatorBuilder::kFloat64RoundTruncate; 1627 MachineOperatorBuilder::kFloat64RoundTruncate;
1622 } 1628 }
1623 return flags; 1629 return flags;
1624 } 1630 }
1625 1631
1626 } // namespace compiler 1632 } // namespace compiler
1627 } // namespace internal 1633 } // namespace internal
1628 } // namespace v8 1634 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/instruction-codes-x64.h ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698