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

Side by Side Diff: runtime/vm/intermediate_language_mips.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_ia32.cc ('k') | runtime/vm/intermediate_language_x64.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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 3522 matching lines...) Expand 10 before | Expand all | Expand 10 after
3533 result->set_in(1, Location::FpuRegisterLocation(D7)); 3533 result->set_in(1, Location::FpuRegisterLocation(D7));
3534 } 3534 }
3535 result->set_out(Location::FpuRegisterLocation(D0)); 3535 result->set_out(Location::FpuRegisterLocation(D0));
3536 return result; 3536 return result;
3537 } 3537 }
3538 3538
3539 3539
3540 void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3540 void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3541 // For pow-function return NaN if exponent is NaN. 3541 // For pow-function return NaN if exponent is NaN.
3542 Label do_call, skip_call; 3542 Label do_call, skip_call;
3543 if (recognized_kind() == MethodRecognizer::kDoublePow) { 3543 if (recognized_kind() == MethodRecognizer::kMathDoublePow) {
3544 DRegister exp = locs()->in(1).fpu_reg(); 3544 DRegister exp = locs()->in(1).fpu_reg();
3545 __ cund(exp, exp); 3545 __ cund(exp, exp);
3546 __ bc1f(&do_call); 3546 __ bc1f(&do_call);
3547 // Exponent is NaN, return NaN. 3547 // Exponent is NaN, return NaN.
3548 __ movd(locs()->out().fpu_reg(), exp); 3548 __ movd(locs()->out().fpu_reg(), exp);
3549 __ b(&skip_call); 3549 __ b(&skip_call);
3550 } 3550 }
3551 __ Bind(&do_call); 3551 __ Bind(&do_call);
3552 // double values are passed and returned in vfp registers. 3552 // double values are passed and returned in vfp registers.
3553 __ CallRuntime(TargetFunction()); 3553 __ CallRuntime(TargetFunction());
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
4073 compiler->GenerateCall(token_pos(), 4073 compiler->GenerateCall(token_pos(),
4074 &label, 4074 &label,
4075 PcDescriptors::kOther, 4075 PcDescriptors::kOther,
4076 locs()); 4076 locs());
4077 __ Drop(2); // Discard type arguments and receiver. 4077 __ Drop(2); // Discard type arguments and receiver.
4078 } 4078 }
4079 4079
4080 } // namespace dart 4080 } // namespace dart
4081 4081
4082 #endif // defined TARGET_ARCH_MIPS 4082 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698