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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 __ LoadFromOffset(kWord, destination.reg(), FP, source_offset); 1707 __ LoadFromOffset(kWord, destination.reg(), FP, source_offset);
1708 } else { 1708 } else {
1709 ASSERT(destination.IsStackSlot()); 1709 ASSERT(destination.IsStackSlot());
1710 const intptr_t source_offset = source.ToStackSlotOffset(); 1710 const intptr_t source_offset = source.ToStackSlotOffset();
1711 const intptr_t dest_offset = destination.ToStackSlotOffset(); 1711 const intptr_t dest_offset = destination.ToStackSlotOffset();
1712 __ LoadFromOffset(kWord, TMP, FP, source_offset); 1712 __ LoadFromOffset(kWord, TMP, FP, source_offset);
1713 __ StoreToOffset(kWord, TMP, FP, dest_offset); 1713 __ StoreToOffset(kWord, TMP, FP, dest_offset);
1714 } 1714 }
1715 } else if (source.IsFpuRegister()) { 1715 } else if (source.IsFpuRegister()) {
1716 if (destination.IsFpuRegister()) { 1716 if (destination.IsFpuRegister()) {
1717 DRegister dst = EvenDRegisterOf(destination.fpu_reg()); 1717 __ vmovq(destination.fpu_reg(), source.fpu_reg());
1718 DRegister src = EvenDRegisterOf(source.fpu_reg());
1719 __ vmovd(dst, src);
1720 } else { 1718 } else {
1721 if (destination.IsDoubleStackSlot()) { 1719 if (destination.IsDoubleStackSlot()) {
1722 const intptr_t dest_offset = destination.ToStackSlotOffset(); 1720 const intptr_t dest_offset = destination.ToStackSlotOffset();
1723 DRegister src = EvenDRegisterOf(source.fpu_reg()); 1721 DRegister src = EvenDRegisterOf(source.fpu_reg());
1724 __ StoreDToOffset(src, FP, dest_offset); 1722 __ StoreDToOffset(src, FP, dest_offset);
1725 } else { 1723 } else {
1726 ASSERT(destination.IsQuadStackSlot()); 1724 ASSERT(destination.IsQuadStackSlot());
1727 UNIMPLEMENTED(); 1725 const intptr_t dest_offset = destination.ToStackSlotOffset();
1726 DRegister dsrc0 = EvenDRegisterOf(source.fpu_reg());
1727 DRegister dsrc1 = OddDRegisterOf(source.fpu_reg());
1728 // TODO(zra): Write and use {Load,Store}Q{From,To}Offset(), which can
1729 // use a single vld1/vst1 instruction.
1730 __ StoreDToOffset(dsrc0, FP, dest_offset);
1731 __ StoreDToOffset(dsrc1, FP, dest_offset + 2*kWordSize);
1728 } 1732 }
1729 } 1733 }
1730 } else if (source.IsDoubleStackSlot()) { 1734 } else if (source.IsDoubleStackSlot()) {
1731 if (destination.IsFpuRegister()) { 1735 if (destination.IsFpuRegister()) {
1732 const intptr_t dest_offset = source.ToStackSlotOffset(); 1736 const intptr_t dest_offset = source.ToStackSlotOffset();
1733 DRegister dst = EvenDRegisterOf(destination.fpu_reg()); 1737 DRegister dst = EvenDRegisterOf(destination.fpu_reg());
1734 __ LoadDFromOffset(dst, FP, dest_offset); 1738 __ LoadDFromOffset(dst, FP, dest_offset);
1735 } else { 1739 } else {
1736 ASSERT(destination.IsDoubleStackSlot()); 1740 ASSERT(destination.IsDoubleStackSlot());
1737 const intptr_t source_offset = source.ToStackSlotOffset(); 1741 const intptr_t source_offset = source.ToStackSlotOffset();
1738 const intptr_t dest_offset = destination.ToStackSlotOffset(); 1742 const intptr_t dest_offset = destination.ToStackSlotOffset();
1739 __ LoadDFromOffset(DTMP, FP, source_offset); 1743 __ LoadDFromOffset(DTMP, FP, source_offset);
1740 __ StoreDToOffset(DTMP, FP, dest_offset); 1744 __ StoreDToOffset(DTMP, FP, dest_offset);
1741 } 1745 }
1742 } else if (source.IsQuadStackSlot()) { 1746 } else if (source.IsQuadStackSlot()) {
1743 UNIMPLEMENTED(); 1747 if (destination.IsFpuRegister()) {
1748 const intptr_t dest_offset = source.ToStackSlotOffset();
1749 DRegister dst0 = EvenDRegisterOf(destination.fpu_reg());
1750 DRegister dst1 = OddDRegisterOf(destination.fpu_reg());
1751 __ LoadDFromOffset(dst0, FP, dest_offset);
1752 __ LoadDFromOffset(dst1, FP, dest_offset + 2*kWordSize);
1753 } else {
1754 ASSERT(destination.IsQuadStackSlot());
1755 const intptr_t source_offset = source.ToStackSlotOffset();
1756 const intptr_t dest_offset = destination.ToStackSlotOffset();
1757 DRegister dtmp0 = DTMP;
1758 DRegister dtmp1 = OddDRegisterOf(QTMP);
1759 __ LoadDFromOffset(dtmp0, FP, source_offset);
1760 __ LoadDFromOffset(dtmp1, FP, source_offset + 2*kWordSize);
1761 __ StoreDToOffset(dtmp0, FP, dest_offset);
1762 __ StoreDToOffset(dtmp1, FP, dest_offset + 2*kWordSize);
1763 }
1744 } else { 1764 } else {
1745 ASSERT(source.IsConstant()); 1765 ASSERT(source.IsConstant());
1746 if (destination.IsRegister()) { 1766 if (destination.IsRegister()) {
1747 const Object& constant = source.constant(); 1767 const Object& constant = source.constant();
1748 __ LoadObject(destination.reg(), constant); 1768 __ LoadObject(destination.reg(), constant);
1749 } else { 1769 } else {
1750 ASSERT(destination.IsStackSlot()); 1770 ASSERT(destination.IsStackSlot());
1751 const intptr_t dest_offset = destination.ToStackSlotOffset(); 1771 const intptr_t dest_offset = destination.ToStackSlotOffset();
1752 __ LoadObject(TMP, source.constant()); 1772 __ LoadObject(TMP, source.constant());
1753 __ StoreToOffset(kWord, TMP, FP, dest_offset); 1773 __ StoreToOffset(kWord, TMP, FP, dest_offset);
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1900 DRegister dreg = EvenDRegisterOf(reg); 1920 DRegister dreg = EvenDRegisterOf(reg);
1901 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); 1921 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
1902 } 1922 }
1903 1923
1904 1924
1905 #undef __ 1925 #undef __
1906 1926
1907 } // namespace dart 1927 } // namespace dart
1908 1928
1909 #endif // defined TARGET_ARCH_ARM 1929 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698