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

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
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 ASSERT(kind() == MethodRecognizer::kMathSqrt);
Ivan Posva 2013/08/05 23:32:16 How about: if (kind() == MethodRecognizer::kMathSq
srdjan 2013/08/06 15:43:05 Done.
3637 DRegister val = EvenDRegisterOf(locs()->in(0).fpu_reg()); 3638 DRegister val = EvenDRegisterOf(locs()->in(0).fpu_reg());
3638 DRegister result = EvenDRegisterOf(locs()->out().fpu_reg()); 3639 DRegister result = EvenDRegisterOf(locs()->out().fpu_reg());
3639 __ vsqrtd(result, val); 3640 __ vsqrtd(result, val);
3640 } 3641 }
3641 3642
3642 3643
3643 LocationSummary* MathMinMaxInstr::MakeLocationSummary() const { 3644 LocationSummary* MathMinMaxInstr::MakeLocationSummary() const {
3644 if (result_cid() == kDoubleCid) { 3645 if (result_cid() == kDoubleCid) {
3645 const intptr_t kNumInputs = 2; 3646 const intptr_t kNumInputs = 2;
3646 const intptr_t kNumTemps = 1; 3647 const intptr_t kNumTemps = 1;
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
4415 compiler->GenerateCall(token_pos(), 4416 compiler->GenerateCall(token_pos(),
4416 &label, 4417 &label,
4417 PcDescriptors::kOther, 4418 PcDescriptors::kOther,
4418 locs()); 4419 locs());
4419 __ Drop(2); // Discard type arguments and receiver. 4420 __ Drop(2); // Discard type arguments and receiver.
4420 } 4421 }
4421 4422
4422 } // namespace dart 4423 } // namespace dart
4423 4424
4424 #endif // defined TARGET_ARCH_ARM 4425 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698