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

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

Issue 1512023002: [turbofan] Change TruncateFloat32ToUint64 to TryTruncateFloat32ToUint64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added better mips64 code. 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/x64/code-generator-x64.cc ('k') | src/mips64/macro-assembler-mips64.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 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 858
859 Node* success_output = NodeProperties::FindProjection(node, 1); 859 Node* success_output = NodeProperties::FindProjection(node, 1);
860 if (success_output) { 860 if (success_output) {
861 outputs[output_count++] = g.DefineAsRegister(success_output); 861 outputs[output_count++] = g.DefineAsRegister(success_output);
862 } 862 }
863 863
864 Emit(kSSEFloat64ToInt64, output_count, outputs, 1, inputs); 864 Emit(kSSEFloat64ToInt64, output_count, outputs, 1, inputs);
865 } 865 }
866 866
867 867
868 void InstructionSelector::VisitTruncateFloat32ToUint64(Node* node) { 868 void InstructionSelector::VisitTryTruncateFloat32ToUint64(Node* node) {
869 X64OperandGenerator g(this); 869 X64OperandGenerator g(this);
870 Emit(kSSEFloat32ToUint64, g.DefineAsRegister(node), g.Use(node->InputAt(0))); 870 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))};
871 InstructionOperand outputs[2];
872 size_t output_count = 0;
873 outputs[output_count++] = g.DefineAsRegister(node);
874
875 Node* success_output = NodeProperties::FindProjection(node, 1);
876 if (success_output) {
877 outputs[output_count++] = g.DefineAsRegister(success_output);
878 }
879
880 Emit(kSSEFloat32ToUint64, output_count, outputs, 1, inputs);
871 } 881 }
872 882
873 883
874 void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) { 884 void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) {
875 X64OperandGenerator g(this); 885 X64OperandGenerator g(this);
876 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; 886 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))};
877 InstructionOperand outputs[2]; 887 InstructionOperand outputs[2];
878 size_t output_count = 0; 888 size_t output_count = 0;
879 outputs[output_count++] = g.DefineAsRegister(node); 889 outputs[output_count++] = g.DefineAsRegister(node);
880 890
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
1760 MachineOperatorBuilder::kFloat64RoundTruncate | 1770 MachineOperatorBuilder::kFloat64RoundTruncate |
1761 MachineOperatorBuilder::kFloat32RoundTiesEven | 1771 MachineOperatorBuilder::kFloat32RoundTiesEven |
1762 MachineOperatorBuilder::kFloat64RoundTiesEven; 1772 MachineOperatorBuilder::kFloat64RoundTiesEven;
1763 } 1773 }
1764 return flags; 1774 return flags;
1765 } 1775 }
1766 1776
1767 } // namespace compiler 1777 } // namespace compiler
1768 } // namespace internal 1778 } // namespace internal
1769 } // namespace v8 1779 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698