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

Unified Diff: runtime/vm/flow_graph_compiler_arm.cc

Issue 19776007: Enables a SIMD test for ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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/disassembler_arm.cc ('k') | runtime/vm/intermediate_language_arm.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 25157)
+++ runtime/vm/flow_graph_compiler_arm.cc (working copy)
@@ -1714,9 +1714,7 @@
}
} else if (source.IsFpuRegister()) {
if (destination.IsFpuRegister()) {
- DRegister dst = EvenDRegisterOf(destination.fpu_reg());
- DRegister src = EvenDRegisterOf(source.fpu_reg());
- __ vmovd(dst, src);
+ __ vmovq(destination.fpu_reg(), source.fpu_reg());
} else {
if (destination.IsDoubleStackSlot()) {
const intptr_t dest_offset = destination.ToStackSlotOffset();
@@ -1724,7 +1722,13 @@
__ StoreDToOffset(src, FP, dest_offset);
} else {
ASSERT(destination.IsQuadStackSlot());
- UNIMPLEMENTED();
+ const intptr_t dest_offset = destination.ToStackSlotOffset();
+ DRegister dsrc0 = EvenDRegisterOf(source.fpu_reg());
+ DRegister dsrc1 = OddDRegisterOf(source.fpu_reg());
+ // TODO(zra): Write and use {Load,Store}Q{From,To}Offset(), which can
+ // use a single vld1/vst1 instruction.
+ __ StoreDToOffset(dsrc0, FP, dest_offset);
+ __ StoreDToOffset(dsrc1, FP, dest_offset + 2*kWordSize);
}
}
} else if (source.IsDoubleStackSlot()) {
@@ -1740,7 +1744,23 @@
__ StoreDToOffset(DTMP, FP, dest_offset);
}
} else if (source.IsQuadStackSlot()) {
- UNIMPLEMENTED();
+ if (destination.IsFpuRegister()) {
+ const intptr_t dest_offset = source.ToStackSlotOffset();
+ DRegister dst0 = EvenDRegisterOf(destination.fpu_reg());
+ DRegister dst1 = OddDRegisterOf(destination.fpu_reg());
+ __ LoadDFromOffset(dst0, FP, dest_offset);
+ __ LoadDFromOffset(dst1, FP, dest_offset + 2*kWordSize);
+ } else {
+ ASSERT(destination.IsQuadStackSlot());
+ const intptr_t source_offset = source.ToStackSlotOffset();
+ const intptr_t dest_offset = destination.ToStackSlotOffset();
+ DRegister dtmp0 = DTMP;
+ DRegister dtmp1 = OddDRegisterOf(QTMP);
+ __ LoadDFromOffset(dtmp0, FP, source_offset);
+ __ LoadDFromOffset(dtmp1, FP, source_offset + 2*kWordSize);
+ __ StoreDToOffset(dtmp0, FP, dest_offset);
+ __ StoreDToOffset(dtmp1, FP, dest_offset + 2*kWordSize);
+ }
} else {
ASSERT(source.IsConstant());
if (destination.IsRegister()) {
« no previous file with comments | « runtime/vm/disassembler_arm.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698