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

Side by Side Diff: runtime/vm/intermediate_language_ia32.cc

Issue 23068020: Fix performance regression on Tracer: recognize _doublePow in Math. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_mips.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 4183 matching lines...) Expand 10 before | Expand all | Expand 10 after
4194 4194
4195 4195
4196 void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4196 void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4197 __ EnterFrame(0); 4197 __ EnterFrame(0);
4198 __ ReserveAlignedFrameSpace(kDoubleSize * InputCount()); 4198 __ ReserveAlignedFrameSpace(kDoubleSize * InputCount());
4199 for (intptr_t i = 0; i < InputCount(); i++) { 4199 for (intptr_t i = 0; i < InputCount(); i++) {
4200 __ movsd(Address(ESP, kDoubleSize * i), locs()->in(i).fpu_reg()); 4200 __ movsd(Address(ESP, kDoubleSize * i), locs()->in(i).fpu_reg());
4201 } 4201 }
4202 // For pow-function return NaN if exponent is NaN. 4202 // For pow-function return NaN if exponent is NaN.
4203 Label do_call, skip_call; 4203 Label do_call, skip_call;
4204 if (recognized_kind() == MethodRecognizer::kDoublePow) { 4204 if (recognized_kind() == MethodRecognizer::kMathDoublePow) {
4205 XmmRegister exp = locs()->in(1).fpu_reg(); 4205 XmmRegister exp = locs()->in(1).fpu_reg();
4206 __ comisd(exp, exp); 4206 __ comisd(exp, exp);
4207 __ j(PARITY_ODD, &do_call, Assembler::kNearJump); // NaN -> false; 4207 __ j(PARITY_ODD, &do_call, Assembler::kNearJump); // NaN -> false;
4208 // Exponent is NaN, return NaN. 4208 // Exponent is NaN, return NaN.
4209 __ movsd(locs()->out().fpu_reg(), exp); 4209 __ movsd(locs()->out().fpu_reg(), exp);
4210 __ jmp(&skip_call, Assembler::kNearJump); 4210 __ jmp(&skip_call, Assembler::kNearJump);
4211 } 4211 }
4212 __ Bind(&do_call); 4212 __ Bind(&do_call);
4213 __ CallRuntime(TargetFunction()); 4213 __ CallRuntime(TargetFunction());
4214 __ fstpl(Address(ESP, 0)); 4214 __ fstpl(Address(ESP, 0));
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
5179 PcDescriptors::kOther, 5179 PcDescriptors::kOther,
5180 locs()); 5180 locs());
5181 __ Drop(2); // Discard type arguments and receiver. 5181 __ Drop(2); // Discard type arguments and receiver.
5182 } 5182 }
5183 5183
5184 } // namespace dart 5184 } // namespace dart
5185 5185
5186 #undef __ 5186 #undef __
5187 5187
5188 #endif // defined TARGET_ARCH_IA32 5188 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698