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

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

Issue 1435203003: [x64] Fixed a rounding error on x64 for the Uint64ToF64 conversion. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed the test to make it platform independent. 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/code-generator-x64.cc ('k') | src/x64/macro-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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 966
967 967
968 void InstructionSelector::VisitRoundInt64ToFloat64(Node* node) { 968 void InstructionSelector::VisitRoundInt64ToFloat64(Node* node) {
969 X64OperandGenerator g(this); 969 X64OperandGenerator g(this);
970 Emit(kSSEInt64ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0))); 970 Emit(kSSEInt64ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
971 } 971 }
972 972
973 973
974 void InstructionSelector::VisitRoundUint64ToFloat64(Node* node) { 974 void InstructionSelector::VisitRoundUint64ToFloat64(Node* node) {
975 X64OperandGenerator g(this); 975 X64OperandGenerator g(this);
976 Emit(kSSEUint64ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0))); 976 InstructionOperand temps[] = {g.TempRegister()};
977 Emit(kSSEUint64ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0)),
978 arraysize(temps), temps);
977 } 979 }
978 980
979 981
980 void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) { 982 void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) {
981 X64OperandGenerator g(this); 983 X64OperandGenerator g(this);
982 Emit(kX64BitcastFI, g.DefineAsRegister(node), g.Use(node->InputAt(0))); 984 Emit(kX64BitcastFI, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
983 } 985 }
984 986
985 987
986 void InstructionSelector::VisitBitcastFloat64ToInt64(Node* node) { 988 void InstructionSelector::VisitBitcastFloat64ToInt64(Node* node) {
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
1661 if (CpuFeatures::IsSupported(SSE4_1)) { 1663 if (CpuFeatures::IsSupported(SSE4_1)) {
1662 flags |= MachineOperatorBuilder::kFloat64RoundDown | 1664 flags |= MachineOperatorBuilder::kFloat64RoundDown |
1663 MachineOperatorBuilder::kFloat64RoundTruncate; 1665 MachineOperatorBuilder::kFloat64RoundTruncate;
1664 } 1666 }
1665 return flags; 1667 return flags;
1666 } 1668 }
1667 1669
1668 } // namespace compiler 1670 } // namespace compiler
1669 } // namespace internal 1671 } // namespace internal
1670 } // namespace v8 1672 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698