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

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 52803002: Adds support for ARM softfp calling convention. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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
« no previous file with comments | « no previous file | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_arm.cc
===================================================================
--- runtime/vm/intermediate_language_arm.cc (revision 29461)
+++ runtime/vm/intermediate_language_arm.cc (working copy)
@@ -3770,8 +3770,15 @@
new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
summary->set_in(0, Location::FpuRegisterLocation(Q0));
summary->set_out(Location::FpuRegisterLocation(Q0));
+#if !defined(ARM_FLOAT_ABI_HARD)
+ summary->AddTemp(Location::RegisterLocation(R0));
+ summary->AddTemp(Location::RegisterLocation(R1));
+ summary->AddTemp(Location::RegisterLocation(R2));
+ summary->AddTemp(Location::RegisterLocation(R3));
+#endif
return summary;
}
+ // Sqrt.
const intptr_t kNumInputs = 1;
const intptr_t kNumTemps = 0;
LocationSummary* summary =
@@ -3788,7 +3795,18 @@
DRegister result = EvenDRegisterOf(locs()->out().fpu_reg());
__ vsqrtd(result, val);
} else {
+#if defined(ARM_FLOAT_ABI_HARD)
__ CallRuntime(TargetFunction(), InputCount());
+#else
+ // If we aren't doing "hardfp", then we have to move the double arguments
+ // to the integer registers, and take the results from the integer
+ // registers.
+ __ vmovrrd(R0, R1, D0);
+ __ vmovrrd(R2, R3, D1);
+ __ CallRuntime(TargetFunction(), InputCount());
+ __ vmovdrr(D0, R0, R1);
+ __ vmovdrr(D1, R2, R3);
+#endif
}
}
@@ -4079,6 +4097,15 @@
result->AddTemp(Location::RegisterLocation(R2));
result->AddTemp(Location::FpuRegisterLocation(Q2));
}
+#if !defined(ARM_FLOAT_ABI_HARD)
+ result->AddTemp(Location::RegisterLocation(R0));
+ result->AddTemp(Location::RegisterLocation(R1));
+ // Check if R2 is already added.
+ if (recognized_kind() != MethodRecognizer::kMathDoublePow) {
+ result->AddTemp(Location::RegisterLocation(R2));
+ }
+ result->AddTemp(Location::RegisterLocation(R3));
+#endif
result->set_out(Location::FpuRegisterLocation(Q0));
return result;
}
@@ -4121,15 +4148,22 @@
__ vmovd(base, saved_base); // Restore base.
}
__ Bind(&do_call);
- // We currently use 'hardfp' ('gnueabihf') rather than 'softfp'
- // ('gnueabi') float ABI for leaf runtime calls, i.e. double values
- // are passed and returned in vfp registers rather than in integer
- // register pairs.
if (InputCount() == 2) {
// Args must be in D0 and D1, so move arg from Q1(== D3:D2) to D1.
__ vmovd(D1, D2);
}
+#if defined(ARM_FLOAT_ABI_HARD)
__ CallRuntime(TargetFunction(), InputCount());
+#else
+ // If the ABI is not "hardfp", then we have to move the double arguments
+ // to the integer registers, and take the results from the integer
+ // registers.
+ __ vmovrrd(R0, R1, D0);
+ __ vmovrrd(R2, R3, D1);
+ __ CallRuntime(TargetFunction(), InputCount());
+ __ vmovdrr(D0, R0, R1);
+ __ vmovdrr(D1, R2, R3);
+#endif
__ Bind(&skip_call);
}
« no previous file with comments | « no previous file | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698