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

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

Issue 22266005: Inline fsin/fcos. Huge speedup on Box2D. (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.h ('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 3604 matching lines...) Expand 10 before | Expand all | Expand 10 after
3615 } 3615 }
3616 case Token::kBIT_XOR: { 3616 case Token::kBIT_XOR: {
3617 __ veorq(result, left, right); 3617 __ veorq(result, left, right);
3618 break; 3618 break;
3619 } 3619 }
3620 default: UNREACHABLE(); 3620 default: UNREACHABLE();
3621 } 3621 }
3622 } 3622 }
3623 3623
3624 3624
3625 LocationSummary* MathSqrtInstr::MakeLocationSummary() const { 3625 LocationSummary* MathUnaryInstr::MakeLocationSummary() const {
3626 const intptr_t kNumInputs = 1; 3626 const intptr_t kNumInputs = 1;
3627 const intptr_t kNumTemps = 0; 3627 const intptr_t kNumTemps = 0;
3628 LocationSummary* summary = 3628 LocationSummary* summary =
3629 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 3629 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3630 summary->set_in(0, Location::RequiresFpuRegister()); 3630 summary->set_in(0, Location::RequiresFpuRegister());
3631 summary->set_out(Location::RequiresFpuRegister()); 3631 summary->set_out(Location::RequiresFpuRegister());
3632 return summary; 3632 return summary;
3633 } 3633 }
3634 3634
3635 3635
3636 void MathSqrtInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3636 void MathUnaryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3637 DRegister val = EvenDRegisterOf(locs()->in(0).fpu_reg()); 3637 if (kind() == MethodRecognizer::kMathSqrt) {
3638 DRegister result = EvenDRegisterOf(locs()->out().fpu_reg()); 3638 DRegister val = EvenDRegisterOf(locs()->in(0).fpu_reg());
3639 __ vsqrtd(result, val); 3639 DRegister result = EvenDRegisterOf(locs()->out().fpu_reg());
3640 __ vsqrtd(result, val);
3641 } else {
3642 UNIMPLEMENTED();
3643 }
3640 } 3644 }
3641 3645
3642 3646
3643 LocationSummary* MathMinMaxInstr::MakeLocationSummary() const { 3647 LocationSummary* MathMinMaxInstr::MakeLocationSummary() const {
3644 if (result_cid() == kDoubleCid) { 3648 if (result_cid() == kDoubleCid) {
3645 const intptr_t kNumInputs = 2; 3649 const intptr_t kNumInputs = 2;
3646 const intptr_t kNumTemps = 1; 3650 const intptr_t kNumTemps = 1;
3647 LocationSummary* summary = 3651 LocationSummary* summary =
3648 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 3652 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3649 summary->set_in(0, Location::RequiresFpuRegister()); 3653 summary->set_in(0, Location::RequiresFpuRegister());
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
4415 compiler->GenerateCall(token_pos(), 4419 compiler->GenerateCall(token_pos(),
4416 &label, 4420 &label,
4417 PcDescriptors::kOther, 4421 PcDescriptors::kOther,
4418 locs()); 4422 locs());
4419 __ Drop(2); // Discard type arguments and receiver. 4423 __ Drop(2); // Discard type arguments and receiver.
4420 } 4424 }
4421 4425
4422 } // namespace dart 4426 } // namespace dart
4423 4427
4424 #endif // defined TARGET_ARCH_ARM 4428 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698