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

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

Issue 1512023002: [turbofan] Change TruncateFloat32ToUint64 to TryTruncateFloat32ToUint64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
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/base/bits.h" 6 #include "src/base/bits.h"
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 10
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 864
865 Node* success_output = NodeProperties::FindProjection(node, 1); 865 Node* success_output = NodeProperties::FindProjection(node, 1);
866 if (success_output) { 866 if (success_output) {
867 outputs[output_count++] = g.DefineAsRegister(success_output); 867 outputs[output_count++] = g.DefineAsRegister(success_output);
868 } 868 }
869 869
870 Emit(kMips64TruncLD, output_count, outputs, 1, inputs); 870 Emit(kMips64TruncLD, output_count, outputs, 1, inputs);
871 } 871 }
872 872
873 873
874 void InstructionSelector::VisitTruncateFloat32ToUint64(Node* node) { 874 void InstructionSelector::VisitTryTruncateFloat32ToUint64(Node* node) {
875 VisitRR(this, kMips64TruncUlS, node); 875 Mips64OperandGenerator g(this);
876 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))};
877 InstructionOperand outputs[2];
878 size_t output_count = 0;
879 outputs[output_count++] = g.DefineAsRegister(node);
880
881 Node* success_output = NodeProperties::FindProjection(node, 1);
882 if (success_output) {
883 outputs[output_count++] = g.DefineAsRegister(success_output);
884 }
885
886 Emit(kMips64TruncUlS, output_count, outputs, 1, inputs);
876 } 887 }
877 888
878 889
879 void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) { 890 void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) {
880 Mips64OperandGenerator g(this); 891 Mips64OperandGenerator g(this);
881 892
882 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; 893 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))};
883 InstructionOperand outputs[2]; 894 InstructionOperand outputs[2];
884 size_t output_count = 0; 895 size_t output_count = 0;
885 outputs[output_count++] = g.DefineAsRegister(node); 896 outputs[output_count++] = g.DefineAsRegister(node);
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1766 MachineOperatorBuilder::kFloat32RoundUp | 1777 MachineOperatorBuilder::kFloat32RoundUp |
1767 MachineOperatorBuilder::kFloat64RoundTruncate | 1778 MachineOperatorBuilder::kFloat64RoundTruncate |
1768 MachineOperatorBuilder::kFloat32RoundTruncate | 1779 MachineOperatorBuilder::kFloat32RoundTruncate |
1769 MachineOperatorBuilder::kFloat64RoundTiesEven | 1780 MachineOperatorBuilder::kFloat64RoundTiesEven |
1770 MachineOperatorBuilder::kFloat32RoundTiesEven; 1781 MachineOperatorBuilder::kFloat32RoundTiesEven;
1771 } 1782 }
1772 1783
1773 } // namespace compiler 1784 } // namespace compiler
1774 } // namespace internal 1785 } // namespace internal
1775 } // namespace v8 1786 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698