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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 12038013: Reland r17365. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: replace enter with EnterFrame Created 7 years, 11 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_ia32.cc
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index 3fce02156485ccda3652f5c77e27635180344b60..ca21720d8798a03358846e3ba85bbcd1d7da1647 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -2515,6 +2515,33 @@ void DoubleToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
+LocationSummary* InvokeMathCFunctionInstr::MakeLocationSummary() const {
+ ASSERT((InputCount() == 1) || (InputCount() == 2));
+ const intptr_t kNumTemps = 0;
+ LocationSummary* result =
+ new LocationSummary(InputCount(), kNumTemps, LocationSummary::kCall);
+ result->set_in(0, Location::FpuRegisterLocation(XMM1, Location::kDouble));
+ if (InputCount() == 2) {
+ result->set_in(1, Location::FpuRegisterLocation(XMM2, Location::kDouble));
+ }
+ result->set_out(Location::FpuRegisterLocation(XMM1, Location::kDouble));
+ return result;
+}
+
+
+void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ __ EnterFrame(0);
+ __ ReserveAlignedFrameSpace(kDoubleSize * InputCount());
+ for (intptr_t i = 0; i < InputCount(); i++) {
+ __ movsd(Address(ESP, kDoubleSize * i), locs()->in(i).fpu_reg());
+ }
+ __ CallRuntime(TargetFunction());
+ __ fstpl(Address(ESP, 0));
+ __ movsd(locs()->out().fpu_reg(), Address(ESP, 0));
+ __ leave();
+}
+
+
LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary() const {
return MakeCallSummary();
}

Powered by Google App Engine
This is Rietveld 408576698