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

Unified Diff: runtime/vm/flow_graph_compiler_arm.cc

Issue 292433008: Allows unboxed doubles to be disabled. (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/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_arm.cc
===================================================================
--- runtime/vm/flow_graph_compiler_arm.cc (revision 36258)
+++ runtime/vm/flow_graph_compiler_arm.cc (working copy)
@@ -24,6 +24,7 @@
DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization.");
DEFINE_FLAG(bool, unbox_mints, true, "Optimize 64-bit integer arithmetic.");
+DEFINE_FLAG(bool, unbox_doubles, true, "Optimize double arithmetic.");
DECLARE_FLAG(int, optimization_counter_threshold);
DECLARE_FLAG(int, reoptimization_counter_threshold);
DECLARE_FLAG(bool, enable_type_checks);
@@ -40,6 +41,11 @@
}
+bool FlowGraphCompiler::SupportsUnboxedDoubles() {
+ return TargetCPUFeatures::vfp_supported() && FLAG_unbox_doubles;
+}
+
+
bool FlowGraphCompiler::SupportsUnboxedMints() {
return TargetCPUFeatures::neon_supported() && FLAG_unbox_mints;
}
@@ -1596,7 +1602,14 @@
}
} else if (source.IsFpuRegister()) {
if (destination.IsFpuRegister()) {
- __ vmovq(destination.fpu_reg(), source.fpu_reg());
+ if (TargetCPUFeatures::neon_supported()) {
+ __ vmovq(destination.fpu_reg(), source.fpu_reg());
+ } else {
+ // If we're not inlining simd values, then only the even numbered D
+ // register will have anything in them.
+ __ vmovd(EvenDRegisterOf(destination.fpu_reg()),
+ EvenDRegisterOf(source.fpu_reg()));
+ }
} else {
if (destination.IsDoubleStackSlot()) {
const intptr_t dest_offset = destination.ToStackSlotOffset();
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698