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

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

Issue 1530273002: PPC: [turbofan] Change TruncateFloat32ToInt64 to TryTruncateFloat32ToInt64. (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
« no previous file with comments | « no previous file | no next file » | 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/compiler/instruction-selector-impl.h" 6 #include "src/compiler/instruction-selector-impl.h"
7 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 #include "src/ppc/frames-ppc.h" 9 #include "src/ppc/frames-ppc.h"
10 10
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 VisitRR(this, kPPC_DoubleToInt32, node); 920 VisitRR(this, kPPC_DoubleToInt32, node);
921 } 921 }
922 922
923 923
924 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { 924 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) {
925 VisitRR(this, kPPC_DoubleToUint32, node); 925 VisitRR(this, kPPC_DoubleToUint32, node);
926 } 926 }
927 927
928 928
929 #if V8_TARGET_ARCH_PPC64 929 #if V8_TARGET_ARCH_PPC64
930 void InstructionSelector::VisitTruncateFloat32ToInt64(Node* node) { 930 void InstructionSelector::VisitTryTruncateFloat32ToInt64(Node* node) {
931 VisitRR(this, kPPC_DoubleToInt64, node); 931 PPCOperandGenerator g(this);
932
933 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))};
934 InstructionOperand outputs[2];
935 size_t output_count = 0;
936 outputs[output_count++] = g.DefineAsRegister(node);
937
938 Node* success_output = NodeProperties::FindProjection(node, 1);
939 if (success_output) {
940 outputs[output_count++] = g.DefineAsRegister(success_output);
941 }
942
943 Emit(kPPC_DoubleToInt64, output_count, outputs, 1, inputs);
932 } 944 }
933 945
934 946
935 void InstructionSelector::VisitTryTruncateFloat64ToInt64(Node* node) { 947 void InstructionSelector::VisitTryTruncateFloat64ToInt64(Node* node) {
936 PPCOperandGenerator g(this); 948 PPCOperandGenerator g(this);
937 949
938 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; 950 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))};
939 InstructionOperand outputs[2]; 951 InstructionOperand outputs[2];
940 size_t output_count = 0; 952 size_t output_count = 0;
941 outputs[output_count++] = g.DefineAsRegister(node); 953 outputs[output_count++] = g.DefineAsRegister(node);
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
1723 MachineOperatorBuilder::kFloat64RoundTruncate | 1735 MachineOperatorBuilder::kFloat64RoundTruncate |
1724 MachineOperatorBuilder::kFloat64RoundTiesAway | 1736 MachineOperatorBuilder::kFloat64RoundTiesAway |
1725 MachineOperatorBuilder::kWord32Popcnt | 1737 MachineOperatorBuilder::kWord32Popcnt |
1726 MachineOperatorBuilder::kWord64Popcnt; 1738 MachineOperatorBuilder::kWord64Popcnt;
1727 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. 1739 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f.
1728 } 1740 }
1729 1741
1730 } // namespace compiler 1742 } // namespace compiler
1731 } // namespace internal 1743 } // namespace internal
1732 } // namespace v8 1744 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698