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

Issue 1513463002: MIPS64: [turbofan] Change TruncateFloat64ToUint64 to TryTruncateFloatToUint64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@trytrunc-uint64
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
« no previous file with comments | « src/compiler/mips64/code-generator-mips64.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 "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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::VisitTruncateFloat32ToUint64(Node* node) {
875 VisitRR(this, kMips64TruncUlS, node); 875 VisitRR(this, kMips64TruncUlS, node);
876 } 876 }
877 877
878 878
879 void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) { 879 void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) {
880 if (NodeProperties::FindProjection(node, 1)) { 880 Mips64OperandGenerator g(this);
881 // TODO(mips): implement the second return value. 881
882 UNIMPLEMENTED(); 882 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))};
883 InstructionOperand outputs[2];
884 size_t output_count = 0;
885 outputs[output_count++] = g.DefineAsRegister(node);
886
887 Node* success_output = NodeProperties::FindProjection(node, 1);
888 if (success_output) {
889 outputs[output_count++] = g.DefineAsRegister(success_output);
883 } 890 }
884 VisitRR(this, kMips64TruncUlD, node); 891
892 Emit(kMips64TruncUlD, output_count, outputs, 1, inputs);
885 } 893 }
886 894
887 895
888 void InstructionSelector::VisitChangeInt32ToInt64(Node* node) { 896 void InstructionSelector::VisitChangeInt32ToInt64(Node* node) {
889 Mips64OperandGenerator g(this); 897 Mips64OperandGenerator g(this);
890 Emit(kMips64Shl, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), 898 Emit(kMips64Shl, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)),
891 g.TempImmediate(0)); 899 g.TempImmediate(0));
892 } 900 }
893 901
894 902
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
1756 MachineOperatorBuilder::kFloat32RoundUp | 1764 MachineOperatorBuilder::kFloat32RoundUp |
1757 MachineOperatorBuilder::kFloat64RoundTruncate | 1765 MachineOperatorBuilder::kFloat64RoundTruncate |
1758 MachineOperatorBuilder::kFloat32RoundTruncate | 1766 MachineOperatorBuilder::kFloat32RoundTruncate |
1759 MachineOperatorBuilder::kFloat64RoundTiesEven | 1767 MachineOperatorBuilder::kFloat64RoundTiesEven |
1760 MachineOperatorBuilder::kFloat32RoundTiesEven; 1768 MachineOperatorBuilder::kFloat32RoundTiesEven;
1761 } 1769 }
1762 1770
1763 } // namespace compiler 1771 } // namespace compiler
1764 } // namespace internal 1772 } // namespace internal
1765 } // namespace v8 1773 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips64/code-generator-mips64.cc ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698