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

Issue 1239513003: Version 4.5.103.5 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.5
Patch Set: Created 5 years, 5 months 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 | « include/v8-version.h ('k') | 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 9
10 namespace v8 { 10 namespace v8 {
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 867
868 #if V8_TARGET_ARCH_PPC64 868 #if V8_TARGET_ARCH_PPC64
869 void InstructionSelector::VisitChangeInt32ToInt64(Node* node) { 869 void InstructionSelector::VisitChangeInt32ToInt64(Node* node) {
870 // TODO(mbrandy): inspect input to see if nop is appropriate. 870 // TODO(mbrandy): inspect input to see if nop is appropriate.
871 VisitRR(this, kPPC_ExtendSignWord32, node); 871 VisitRR(this, kPPC_ExtendSignWord32, node);
872 } 872 }
873 873
874 874
875 void InstructionSelector::VisitChangeUint32ToUint64(Node* node) { 875 void InstructionSelector::VisitChangeUint32ToUint64(Node* node) {
876 // TODO(mbrandy): inspect input to see if nop is appropriate. 876 // TODO(mbrandy): inspect input to see if nop is appropriate.
877 PPCOperandGenerator g(this); 877 VisitRR(this, kPPC_Uint32ToUint64, node);
878 Emit(kPPC_Uint32ToUint64, g.DefineAsRegister(node),
879 g.UseRegister(node->InputAt(0)));
880 } 878 }
881 #endif 879 #endif
882 880
883 881
884 void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) { 882 void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) {
885 PPCOperandGenerator g(this); 883 VisitRR(this, kPPC_DoubleToFloat32, node);
886 Emit(kPPC_DoubleToFloat32, g.DefineAsRegister(node), 884 }
887 g.UseRegister(node->InputAt(0))); 885
886
887 void InstructionSelector::VisitTruncateFloat64ToInt32(Node* node) {
888 switch (TruncationModeOf(node->op())) {
889 case TruncationMode::kJavaScript:
890 return VisitRR(this, kArchTruncateDoubleToI, node);
891 case TruncationMode::kRoundToZero:
892 return VisitRR(this, kPPC_DoubleToInt32, node);
893 }
894 UNREACHABLE();
888 } 895 }
889 896
890 897
891 #if V8_TARGET_ARCH_PPC64 898 #if V8_TARGET_ARCH_PPC64
892 void InstructionSelector::VisitTruncateInt64ToInt32(Node* node) { 899 void InstructionSelector::VisitTruncateInt64ToInt32(Node* node) {
893 PPCOperandGenerator g(this);
894 // TODO(mbrandy): inspect input to see if nop is appropriate. 900 // TODO(mbrandy): inspect input to see if nop is appropriate.
895 Emit(kPPC_Int64ToInt32, g.DefineAsRegister(node), 901 VisitRR(this, kPPC_Int64ToInt32, node);
896 g.UseRegister(node->InputAt(0)));
897 } 902 }
898 #endif 903 #endif
899 904
900 905
901 void InstructionSelector::VisitFloat32Add(Node* node) { 906 void InstructionSelector::VisitFloat32Add(Node* node) {
902 VisitRRR(this, kPPC_AddDouble, node); 907 VisitRRR(this, kPPC_AddDouble, node);
903 } 908 }
904 909
905 910
906 void InstructionSelector::VisitFloat64Add(Node* node) { 911 void InstructionSelector::VisitFloat64Add(Node* node) {
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 InstructionSelector::SupportedMachineOperatorFlags() { 1658 InstructionSelector::SupportedMachineOperatorFlags() {
1654 return MachineOperatorBuilder::kFloat64RoundDown | 1659 return MachineOperatorBuilder::kFloat64RoundDown |
1655 MachineOperatorBuilder::kFloat64RoundTruncate | 1660 MachineOperatorBuilder::kFloat64RoundTruncate |
1656 MachineOperatorBuilder::kFloat64RoundTiesAway; 1661 MachineOperatorBuilder::kFloat64RoundTiesAway;
1657 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. 1662 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f.
1658 } 1663 }
1659 1664
1660 } // namespace compiler 1665 } // namespace compiler
1661 } // namespace internal 1666 } // namespace internal
1662 } // namespace v8 1667 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8-version.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698