OLD | NEW |
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 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 | 903 |
904 | 904 |
905 #if V8_TARGET_ARCH_PPC64 | 905 #if V8_TARGET_ARCH_PPC64 |
906 void InstructionSelector::VisitTruncateInt64ToInt32(Node* node) { | 906 void InstructionSelector::VisitTruncateInt64ToInt32(Node* node) { |
907 // TODO(mbrandy): inspect input to see if nop is appropriate. | 907 // TODO(mbrandy): inspect input to see if nop is appropriate. |
908 VisitRR(this, kPPC_Int64ToInt32, node); | 908 VisitRR(this, kPPC_Int64ToInt32, node); |
909 } | 909 } |
910 #endif | 910 #endif |
911 | 911 |
912 | 912 |
| 913 void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) { |
| 914 VisitRR(this, kPPC_DoubleExtractLowWord32, node); |
| 915 } |
| 916 |
| 917 |
| 918 #if V8_TARGET_ARCH_PPC64 |
| 919 void InstructionSelector::VisitBitcastFloat64ToInt64(Node* node) { |
| 920 VisitRR(this, kPPC_BitcastDL, node); |
| 921 } |
| 922 #endif |
| 923 |
| 924 |
| 925 void InstructionSelector::VisitBitcastInt32ToFloat32(Node* node) { |
| 926 PPCOperandGenerator g(this); |
| 927 Emit(kPPC_DoubleInsertLowWord32, g.DefineAsRegister(node), |
| 928 ImmediateOperand(ImmediateOperand::INLINE, 0), |
| 929 g.UseRegister(node->InputAt(0))); |
| 930 } |
| 931 |
| 932 |
| 933 #if V8_TARGET_ARCH_PPC64 |
| 934 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) { |
| 935 VisitRR(this, kPPC_BitcastLD, node); |
| 936 } |
| 937 #endif |
| 938 |
| 939 |
913 void InstructionSelector::VisitFloat32Add(Node* node) { | 940 void InstructionSelector::VisitFloat32Add(Node* node) { |
914 VisitRRR(this, kPPC_AddDouble, node); | 941 VisitRRR(this, kPPC_AddDouble, node); |
915 } | 942 } |
916 | 943 |
917 | 944 |
918 void InstructionSelector::VisitFloat64Add(Node* node) { | 945 void InstructionSelector::VisitFloat64Add(Node* node) { |
919 // TODO(mbrandy): detect multiply-add | 946 // TODO(mbrandy): detect multiply-add |
920 VisitRRR(this, kPPC_AddDouble, node); | 947 VisitRRR(this, kPPC_AddDouble, node); |
921 } | 948 } |
922 | 949 |
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1678 InstructionSelector::SupportedMachineOperatorFlags() { | 1705 InstructionSelector::SupportedMachineOperatorFlags() { |
1679 return MachineOperatorBuilder::kFloat64RoundDown | | 1706 return MachineOperatorBuilder::kFloat64RoundDown | |
1680 MachineOperatorBuilder::kFloat64RoundTruncate | | 1707 MachineOperatorBuilder::kFloat64RoundTruncate | |
1681 MachineOperatorBuilder::kFloat64RoundTiesAway; | 1708 MachineOperatorBuilder::kFloat64RoundTiesAway; |
1682 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. | 1709 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. |
1683 } | 1710 } |
1684 | 1711 |
1685 } // namespace compiler | 1712 } // namespace compiler |
1686 } // namespace internal | 1713 } // namespace internal |
1687 } // namespace v8 | 1714 } // namespace v8 |
OLD | NEW |