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

Side by Side Diff: runtime/vm/intermediate_language_arm.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.cc ('k') | runtime/vm/intermediate_language_ia32.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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
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 4122 matching lines...) Expand 10 before | Expand all | Expand 10 after
4133 result->set_in(1, Location::FpuRegisterLocation(Q1)); 4133 result->set_in(1, Location::FpuRegisterLocation(Q1));
4134 } 4134 }
4135 result->set_out(Location::FpuRegisterLocation(Q0)); 4135 result->set_out(Location::FpuRegisterLocation(Q0));
4136 return result; 4136 return result;
4137 } 4137 }
4138 4138
4139 4139
4140 void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4140 void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4141 // For pow-function return NaN if exponent is NaN. 4141 // For pow-function return NaN if exponent is NaN.
4142 Label do_call, skip_call; 4142 Label do_call, skip_call;
4143 if (recognized_kind() == MethodRecognizer::kDoublePow) { 4143 if (recognized_kind() == MethodRecognizer::kMathDoublePow) {
4144 DRegister exp = EvenDRegisterOf(locs()->in(1).fpu_reg()); 4144 DRegister exp = EvenDRegisterOf(locs()->in(1).fpu_reg());
4145 DRegister result = EvenDRegisterOf(locs()->out().fpu_reg()); 4145 DRegister result = EvenDRegisterOf(locs()->out().fpu_reg());
4146 __ vcmpd(exp, exp); 4146 __ vcmpd(exp, exp);
4147 __ vmstat(); 4147 __ vmstat();
4148 __ b(&do_call, VC); // NaN -> false; 4148 __ b(&do_call, VC); // NaN -> false;
4149 // Exponent is NaN, return NaN. 4149 // Exponent is NaN, return NaN.
4150 __ vmovd(result, exp); 4150 __ vmovd(result, exp);
4151 __ b(&skip_call); 4151 __ b(&skip_call);
4152 } 4152 }
4153 __ Bind(&do_call); 4153 __ Bind(&do_call);
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
4643 compiler->GenerateCall(token_pos(), 4643 compiler->GenerateCall(token_pos(),
4644 &label, 4644 &label,
4645 PcDescriptors::kOther, 4645 PcDescriptors::kOther,
4646 locs()); 4646 locs());
4647 __ Drop(2); // Discard type arguments and receiver. 4647 __ Drop(2); // Discard type arguments and receiver.
4648 } 4648 }
4649 4649
4650 } // namespace dart 4650 } // namespace dart
4651 4651
4652 #endif // defined TARGET_ARCH_ARM 4652 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698