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

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 22853009: For trigonometric functions call to C-libraries: they are faster than x87 operations (3% on Box2D). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/intermediate_language_arm.cc
===================================================================
--- runtime/vm/intermediate_language_arm.cc (revision 27253)
+++ runtime/vm/intermediate_language_arm.cc (working copy)
@@ -3760,6 +3760,16 @@
LocationSummary* MathUnaryInstr::MakeLocationSummary() const {
+ if ((kind() == MethodRecognizer::kMathSin) ||
+ (kind() == MethodRecognizer::kMathCos)) {
+ const intptr_t kNumInputs = 1;
+ const intptr_t kNumTemps = 0;
+ LocationSummary* summary =
+ new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
+ summary->set_in(0, Location::FpuRegisterLocation(Q0));
+ summary->set_out(Location::FpuRegisterLocation(Q0));
+ return summary;
+ }
const intptr_t kNumInputs = 1;
const intptr_t kNumTemps = 0;
LocationSummary* summary =
@@ -3776,7 +3786,7 @@
DRegister result = EvenDRegisterOf(locs()->out().fpu_reg());
__ vsqrtd(result, val);
} else {
- UNIMPLEMENTED();
+ __ CallRuntime(TargetFunction(), InputCount());
}
}

Powered by Google App Engine
This is Rietveld 408576698