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

Unified Diff: runtime/vm/simulator_arm.cc

Issue 298533002: For arm, chooses hard vs. soft fp ABI based on compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 | « runtime/vm/intermediate_language_arm.cc ('k') | tools/gyp/configurations_make.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_arm.cc
===================================================================
--- runtime/vm/simulator_arm.cc (revision 36331)
+++ runtime/vm/simulator_arm.cc (working copy)
@@ -1458,31 +1458,31 @@
(redirection->argument_count() <= 2));
SimulatorLeafFloatRuntimeCall target =
reinterpret_cast<SimulatorLeafFloatRuntimeCall>(external);
-#if defined(ARM_FLOAT_ABI_HARD)
- // If we're doing "hardfp", the double arguments are already in the
- // floating point registers.
- double d0 = get_dregister(D0);
- double d1 = get_dregister(D1);
- d0 = target(d0, d1);
- set_dregister(D0, d0);
-#else
- // If we're not doing "hardfp", we must be doing "soft" or "softfp",
- // So take the double arguments from the integer registers.
- uint32_t r0 = get_register(R0);
- int32_t r1 = get_register(R1);
- uint32_t r2 = get_register(R2);
- int32_t r3 = get_register(R3);
- int64_t a0 = Utils::LowHighTo64Bits(r0, r1);
- int64_t a1 = Utils::LowHighTo64Bits(r2, r3);
- double d0 = bit_cast<double, int64_t>(a0);
- double d1 = bit_cast<double, int64_t>(a1);
- d0 = target(d0, d1);
- a0 = bit_cast<int64_t, double>(d0);
- r0 = Utils::Low32Bits(a0);
- r1 = Utils::High32Bits(a0);
- set_register(R0, r0);
- set_register(R1, r1);
-#endif
+ if (TargetCPUFeatures::hardfp_supported()) {
+ // If we're doing "hardfp", the double arguments are already in the
+ // floating point registers.
+ double d0 = get_dregister(D0);
+ double d1 = get_dregister(D1);
+ d0 = target(d0, d1);
+ set_dregister(D0, d0);
+ } else {
+ // If we're not doing "hardfp", we must be doing "soft" or "softfp",
+ // So take the double arguments from the integer registers.
+ uint32_t r0 = get_register(R0);
+ int32_t r1 = get_register(R1);
+ uint32_t r2 = get_register(R2);
+ int32_t r3 = get_register(R3);
+ int64_t a0 = Utils::LowHighTo64Bits(r0, r1);
+ int64_t a1 = Utils::LowHighTo64Bits(r2, r3);
+ double d0 = bit_cast<double, int64_t>(a0);
+ double d1 = bit_cast<double, int64_t>(a1);
+ d0 = target(d0, d1);
+ a0 = bit_cast<int64_t, double>(d0);
+ r0 = Utils::Low32Bits(a0);
+ r1 = Utils::High32Bits(a0);
+ set_register(R0, r0);
+ set_register(R1, r1);
+ }
} else if (redirection->call_kind() == kBootstrapNativeCall) {
NativeArguments* arguments;
arguments = reinterpret_cast<NativeArguments*>(get_register(R0));
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | tools/gyp/configurations_make.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698