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

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

Issue 1358193002: PPC: Fix "[turbofan] Add support for reinterpreting integers as floating point and vice versa." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « src/compiler/ppc/instruction-codes-ppc.h ('k') | src/ppc/macro-assembler-ppc.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/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 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) { 913 void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) {
914 VisitRR(this, kPPC_DoubleExtractLowWord32, node); 914 VisitRR(this, kPPC_BitcastFloat32ToInt32, node);
915 } 915 }
916 916
917 917
918 #if V8_TARGET_ARCH_PPC64 918 #if V8_TARGET_ARCH_PPC64
919 void InstructionSelector::VisitBitcastFloat64ToInt64(Node* node) { 919 void InstructionSelector::VisitBitcastFloat64ToInt64(Node* node) {
920 VisitRR(this, kPPC_BitcastDL, node); 920 VisitRR(this, kPPC_BitcastDoubleToInt64, node);
921 } 921 }
922 #endif 922 #endif
923 923
924 924
925 void InstructionSelector::VisitBitcastInt32ToFloat32(Node* node) { 925 void InstructionSelector::VisitBitcastInt32ToFloat32(Node* node) {
926 PPCOperandGenerator g(this); 926 VisitRR(this, kPPC_BitcastInt32ToFloat32, node);
927 Emit(kPPC_DoubleInsertLowWord32, g.DefineAsRegister(node),
928 ImmediateOperand(ImmediateOperand::INLINE, 0),
929 g.UseRegister(node->InputAt(0)));
930 } 927 }
931 928
932 929
933 #if V8_TARGET_ARCH_PPC64 930 #if V8_TARGET_ARCH_PPC64
934 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) { 931 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) {
935 VisitRR(this, kPPC_BitcastLD, node); 932 VisitRR(this, kPPC_BitcastInt64ToDouble, node);
936 } 933 }
937 #endif 934 #endif
938 935
939 936
940 void InstructionSelector::VisitFloat32Add(Node* node) { 937 void InstructionSelector::VisitFloat32Add(Node* node) {
941 VisitRRR(this, kPPC_AddDouble, node); 938 VisitRRR(this, kPPC_AddDouble, node);
942 } 939 }
943 940
944 941
945 void InstructionSelector::VisitFloat64Add(Node* node) { 942 void InstructionSelector::VisitFloat64Add(Node* node) {
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 InstructionSelector::SupportedMachineOperatorFlags() { 1702 InstructionSelector::SupportedMachineOperatorFlags() {
1706 return MachineOperatorBuilder::kFloat64RoundDown | 1703 return MachineOperatorBuilder::kFloat64RoundDown |
1707 MachineOperatorBuilder::kFloat64RoundTruncate | 1704 MachineOperatorBuilder::kFloat64RoundTruncate |
1708 MachineOperatorBuilder::kFloat64RoundTiesAway; 1705 MachineOperatorBuilder::kFloat64RoundTiesAway;
1709 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. 1706 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f.
1710 } 1707 }
1711 1708
1712 } // namespace compiler 1709 } // namespace compiler
1713 } // namespace internal 1710 } // namespace internal
1714 } // namespace v8 1711 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ppc/instruction-codes-ppc.h ('k') | src/ppc/macro-assembler-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698