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

Unified Diff: runtime/vm/flow_graph_compiler_arm.cc

Issue 266633007: Merge ConstantInstr -> UnboxDouble to UnboxedConstant. Reduces register usage and allows for variou… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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_builder.cc ('k') | runtime/vm/flow_graph_compiler_ia32.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 35656)
+++ runtime/vm/flow_graph_compiler_arm.cc (working copy)
@@ -1608,7 +1608,7 @@
} else if (source.IsDoubleStackSlot()) {
if (destination.IsFpuRegister()) {
const intptr_t dest_offset = source.ToStackSlotOffset();
- DRegister dst = EvenDRegisterOf(destination.fpu_reg());
+ const DRegister dst = EvenDRegisterOf(destination.fpu_reg());
__ LoadDFromOffset(dst, FP, dest_offset);
} else {
ASSERT(destination.IsDoubleStackSlot());
@@ -1632,13 +1632,18 @@
}
} else {
ASSERT(source.IsConstant());
+ const Object& constant = source.constant();
if (destination.IsRegister()) {
- const Object& constant = source.constant();
__ LoadObject(destination.reg(), constant);
+ } else if (destination.IsFpuRegister()) {
+ const DRegister dst = EvenDRegisterOf(destination.fpu_reg());
+ __ LoadObject(TMP, constant);
+ __ AddImmediate(TMP, TMP, Double::value_offset() - kHeapObjectTag);
+ __ vldrd(dst, Address(TMP, 0));
} else {
ASSERT(destination.IsStackSlot());
const intptr_t dest_offset = destination.ToStackSlotOffset();
- __ LoadObject(TMP, source.constant());
+ __ LoadObject(TMP, constant);
__ StoreToOffset(kWord, TMP, FP, dest_offset);
}
}
@@ -1665,7 +1670,7 @@
} else if (source.IsStackSlot() && destination.IsStackSlot()) {
Exchange(source.ToStackSlotOffset(), destination.ToStackSlotOffset());
} else if (source.IsFpuRegister() && destination.IsFpuRegister()) {
- DRegister dst = EvenDRegisterOf(destination.fpu_reg());
+ const DRegister dst = EvenDRegisterOf(destination.fpu_reg());
DRegister src = EvenDRegisterOf(source.fpu_reg());
__ vmovd(DTMP, src);
__ vmovd(src, dst);
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698