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); |
} |