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

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

Issue 595963002: Extend JSBuiltinReducer to cover Math.sqrt as well. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment by Benedikt. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/arm/instruction-codes-arm.h ('k') | src/compiler/arm64/code-generator-arm64.cc » ('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/bits.h" 5 #include "src/base/bits.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 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 case kArmUbfx: 83 case kArmUbfx:
84 case kArmVcmpF64: 84 case kArmVcmpF64:
85 case kArmVaddF64: 85 case kArmVaddF64:
86 case kArmVsubF64: 86 case kArmVsubF64:
87 case kArmVmulF64: 87 case kArmVmulF64:
88 case kArmVmlaF64: 88 case kArmVmlaF64:
89 case kArmVmlsF64: 89 case kArmVmlsF64:
90 case kArmVdivF64: 90 case kArmVdivF64:
91 case kArmVmodF64: 91 case kArmVmodF64:
92 case kArmVnegF64: 92 case kArmVnegF64:
93 case kArmVsqrtF64:
93 case kArmVcvtF64S32: 94 case kArmVcvtF64S32:
94 case kArmVcvtF64U32: 95 case kArmVcvtF64U32:
95 case kArmVcvtS32F64: 96 case kArmVcvtS32F64:
96 case kArmVcvtU32F64: 97 case kArmVcvtU32F64:
97 case kArmPush: 98 case kArmPush:
98 return false; 99 return false;
99 } 100 }
100 UNREACHABLE(); 101 UNREACHABLE();
101 return false; 102 return false;
102 } 103 }
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 } 762 }
762 763
763 764
764 void InstructionSelector::VisitFloat64Mod(Node* node) { 765 void InstructionSelector::VisitFloat64Mod(Node* node) {
765 ArmOperandGenerator g(this); 766 ArmOperandGenerator g(this);
766 Emit(kArmVmodF64, g.DefineAsFixed(node, d0), g.UseFixed(node->InputAt(0), d0), 767 Emit(kArmVmodF64, g.DefineAsFixed(node, d0), g.UseFixed(node->InputAt(0), d0),
767 g.UseFixed(node->InputAt(1), d1))->MarkAsCall(); 768 g.UseFixed(node->InputAt(1), d1))->MarkAsCall();
768 } 769 }
769 770
770 771
772 void InstructionSelector::VisitFloat64Sqrt(Node* node) {
773 ArmOperandGenerator g(this);
774 Emit(kArmVsqrtF64, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)));
775 }
776
777
771 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, 778 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation,
772 BasicBlock* deoptimization) { 779 BasicBlock* deoptimization) {
773 ArmOperandGenerator g(this); 780 ArmOperandGenerator g(this);
774 CallDescriptor* descriptor = OpParameter<CallDescriptor*>(call); 781 CallDescriptor* descriptor = OpParameter<CallDescriptor*>(call);
775 782
776 FrameStateDescriptor* frame_state_descriptor = NULL; 783 FrameStateDescriptor* frame_state_descriptor = NULL;
777 if (descriptor->NeedsFrameState()) { 784 if (descriptor->NeedsFrameState()) {
778 frame_state_descriptor = 785 frame_state_descriptor =
779 GetFrameStateDescriptor(call->InputAt(descriptor->InputCount())); 786 GetFrameStateDescriptor(call->InputAt(descriptor->InputCount()));
780 } 787 }
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 } else { 941 } else {
935 DCHECK(cont->IsSet()); 942 DCHECK(cont->IsSet());
936 Emit(cont->Encode(kArmVcmpF64), g.DefineAsRegister(cont->result()), 943 Emit(cont->Encode(kArmVcmpF64), g.DefineAsRegister(cont->result()),
937 g.UseRegister(m.left().node()), g.UseRegister(m.right().node())); 944 g.UseRegister(m.left().node()), g.UseRegister(m.right().node()));
938 } 945 }
939 } 946 }
940 947
941 } // namespace compiler 948 } // namespace compiler
942 } // namespace internal 949 } // namespace internal
943 } // namespace v8 950 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/instruction-codes-arm.h ('k') | src/compiler/arm64/code-generator-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698