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

Side by Side Diff: runtime/vm/assembler_arm_test.cc

Issue 19256021: Merges ARM load/store type enums into one enum. (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
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/disassembler_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/os.h" 9 #include "vm/os.h"
10 #include "vm/unit_test.h" 10 #include "vm/unit_test.h"
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 __ vmovsr(S3, R0); 1608 __ vmovsr(S3, R0);
1609 __ mov(R0, ShifterOperand(5)); 1609 __ mov(R0, ShifterOperand(5));
1610 __ vmovsr(S4, R0); 1610 __ vmovsr(S4, R0);
1611 __ mov(R0, ShifterOperand(6)); 1611 __ mov(R0, ShifterOperand(6));
1612 __ vmovsr(S5, R0); 1612 __ vmovsr(S5, R0);
1613 __ mov(R0, ShifterOperand(7)); 1613 __ mov(R0, ShifterOperand(7));
1614 __ vmovsr(S6, R0); 1614 __ vmovsr(S6, R0);
1615 __ mov(R0, ShifterOperand(8)); 1615 __ mov(R0, ShifterOperand(8));
1616 __ vmovsr(S7, R0); 1616 __ vmovsr(S7, R0);
1617 1617
1618 // TODO(zra): Replace 0 with enum value that implies 1-byte elements. 1618 __ vaddqi(kByte, Q2, Q0, Q1);
1619 __ vaddqi(0, Q2, Q0, Q1);
1620 1619
1621 __ vmovrs(R0, S8); 1620 __ vmovrs(R0, S8);
1622 __ vmovrs(R1, S9); 1621 __ vmovrs(R1, S9);
1623 __ vmovrs(R2, S10); 1622 __ vmovrs(R2, S10);
1624 __ vmovrs(R3, S11); 1623 __ vmovrs(R3, S11);
1625 1624
1626 __ add(R0, R0, ShifterOperand(R1)); 1625 __ add(R0, R0, ShifterOperand(R1));
1627 __ add(R0, R0, ShifterOperand(R2)); 1626 __ add(R0, R0, ShifterOperand(R2));
1628 __ add(R0, R0, ShifterOperand(R3)); 1627 __ add(R0, R0, ShifterOperand(R3));
1629 __ bx(LR); 1628 __ bx(LR);
(...skipping 23 matching lines...) Expand all
1653 __ vmovsr(S3, R0); 1652 __ vmovsr(S3, R0);
1654 __ mov(R0, ShifterOperand(5)); 1653 __ mov(R0, ShifterOperand(5));
1655 __ vmovsr(S4, R0); 1654 __ vmovsr(S4, R0);
1656 __ mov(R0, ShifterOperand(6)); 1655 __ mov(R0, ShifterOperand(6));
1657 __ vmovsr(S5, R0); 1656 __ vmovsr(S5, R0);
1658 __ mov(R0, ShifterOperand(7)); 1657 __ mov(R0, ShifterOperand(7));
1659 __ vmovsr(S6, R0); 1658 __ vmovsr(S6, R0);
1660 __ mov(R0, ShifterOperand(8)); 1659 __ mov(R0, ShifterOperand(8));
1661 __ vmovsr(S7, R0); 1660 __ vmovsr(S7, R0);
1662 1661
1663 // TODO(zra): Replace 1 with enum value that implies 2-byte elements. 1662 __ vaddqi(kHalfword, Q2, Q0, Q1);
1664 __ vaddqi(1, Q2, Q0, Q1);
1665 1663
1666 __ vmovrs(R0, S8); 1664 __ vmovrs(R0, S8);
1667 __ vmovrs(R1, S9); 1665 __ vmovrs(R1, S9);
1668 __ vmovrs(R2, S10); 1666 __ vmovrs(R2, S10);
1669 __ vmovrs(R3, S11); 1667 __ vmovrs(R3, S11);
1670 1668
1671 __ add(R0, R0, ShifterOperand(R1)); 1669 __ add(R0, R0, ShifterOperand(R1));
1672 __ add(R0, R0, ShifterOperand(R2)); 1670 __ add(R0, R0, ShifterOperand(R2));
1673 __ add(R0, R0, ShifterOperand(R3)); 1671 __ add(R0, R0, ShifterOperand(R3));
1674 __ bx(LR); 1672 __ bx(LR);
(...skipping 23 matching lines...) Expand all
1698 __ vmovsr(S3, R0); 1696 __ vmovsr(S3, R0);
1699 __ mov(R0, ShifterOperand(5)); 1697 __ mov(R0, ShifterOperand(5));
1700 __ vmovsr(S4, R0); 1698 __ vmovsr(S4, R0);
1701 __ mov(R0, ShifterOperand(6)); 1699 __ mov(R0, ShifterOperand(6));
1702 __ vmovsr(S5, R0); 1700 __ vmovsr(S5, R0);
1703 __ mov(R0, ShifterOperand(7)); 1701 __ mov(R0, ShifterOperand(7));
1704 __ vmovsr(S6, R0); 1702 __ vmovsr(S6, R0);
1705 __ mov(R0, ShifterOperand(8)); 1703 __ mov(R0, ShifterOperand(8));
1706 __ vmovsr(S7, R0); 1704 __ vmovsr(S7, R0);
1707 1705
1708 // TODO(zra): Replace 2 with enum value that implies 4-byte elements. 1706 __ vaddqi(kWord, Q2, Q0, Q1);
1709 __ vaddqi(2, Q2, Q0, Q1);
1710 1707
1711 __ vmovrs(R0, S8); 1708 __ vmovrs(R0, S8);
1712 __ vmovrs(R1, S9); 1709 __ vmovrs(R1, S9);
1713 __ vmovrs(R2, S10); 1710 __ vmovrs(R2, S10);
1714 __ vmovrs(R3, S11); 1711 __ vmovrs(R3, S11);
1715 1712
1716 __ add(R0, R0, ShifterOperand(R1)); 1713 __ add(R0, R0, ShifterOperand(R1));
1717 __ add(R0, R0, ShifterOperand(R2)); 1714 __ add(R0, R0, ShifterOperand(R2));
1718 __ add(R0, R0, ShifterOperand(R3)); 1715 __ add(R0, R0, ShifterOperand(R3));
1719 __ bx(LR); 1716 __ bx(LR);
(...skipping 15 matching lines...) Expand all
1735 if (CPUFeatures::neon_supported()) { 1732 if (CPUFeatures::neon_supported()) {
1736 __ mov(R0, ShifterOperand(1)); 1733 __ mov(R0, ShifterOperand(1));
1737 __ vmovsr(S0, R0); 1734 __ vmovsr(S0, R0);
1738 __ mov(R0, ShifterOperand(2)); 1735 __ mov(R0, ShifterOperand(2));
1739 __ vmovsr(S2, R0); 1736 __ vmovsr(S2, R0);
1740 __ mov(R0, ShifterOperand(3)); 1737 __ mov(R0, ShifterOperand(3));
1741 __ vmovsr(S4, R0); 1738 __ vmovsr(S4, R0);
1742 __ mov(R0, ShifterOperand(4)); 1739 __ mov(R0, ShifterOperand(4));
1743 __ vmovsr(S6, R0); 1740 __ vmovsr(S6, R0);
1744 1741
1745 // TODO(zra): Replace 3 with enum value that implies 8-byte elements. 1742 __ vaddqi(kWordPair, Q2, Q0, Q1);
1746 __ vaddqi(3, Q2, Q0, Q1);
1747 1743
1748 __ vmovrs(R0, S8); 1744 __ vmovrs(R0, S8);
1749 __ vmovrs(R2, S10); 1745 __ vmovrs(R2, S10);
1750 1746
1751 __ add(R0, R0, ShifterOperand(R2)); 1747 __ add(R0, R0, ShifterOperand(R2));
1752 __ bx(LR); 1748 __ bx(LR);
1753 } else { 1749 } else {
1754 __ LoadImmediate(R0, 10); 1750 __ LoadImmediate(R0, 10);
1755 __ bx(LR); 1751 __ bx(LR);
1756 } 1752 }
(...skipping 19 matching lines...) Expand all
1776 __ vmovsr(S3, R0); 1772 __ vmovsr(S3, R0);
1777 __ mov(R0, ShifterOperand(2)); 1773 __ mov(R0, ShifterOperand(2));
1778 __ vmovsr(S4, R0); 1774 __ vmovsr(S4, R0);
1779 __ mov(R0, ShifterOperand(4)); 1775 __ mov(R0, ShifterOperand(4));
1780 __ vmovsr(S5, R0); 1776 __ vmovsr(S5, R0);
1781 __ mov(R0, ShifterOperand(6)); 1777 __ mov(R0, ShifterOperand(6));
1782 __ vmovsr(S6, R0); 1778 __ vmovsr(S6, R0);
1783 __ mov(R0, ShifterOperand(8)); 1779 __ mov(R0, ShifterOperand(8));
1784 __ vmovsr(S7, R0); 1780 __ vmovsr(S7, R0);
1785 1781
1786 // TODO(zra): Replace 0 with enum value that implies 1-byte elements. 1782 __ vsubqi(kByte, Q2, Q1, Q0);
1787 __ vsubqi(0, Q2, Q1, Q0);
1788 1783
1789 __ vmovrs(R0, S8); 1784 __ vmovrs(R0, S8);
1790 __ vmovrs(R1, S9); 1785 __ vmovrs(R1, S9);
1791 __ vmovrs(R2, S10); 1786 __ vmovrs(R2, S10);
1792 __ vmovrs(R3, S11); 1787 __ vmovrs(R3, S11);
1793 1788
1794 __ add(R0, R0, ShifterOperand(R1)); 1789 __ add(R0, R0, ShifterOperand(R1));
1795 __ add(R0, R0, ShifterOperand(R2)); 1790 __ add(R0, R0, ShifterOperand(R2));
1796 __ add(R0, R0, ShifterOperand(R3)); 1791 __ add(R0, R0, ShifterOperand(R3));
1797 __ bx(LR); 1792 __ bx(LR);
(...skipping 23 matching lines...) Expand all
1821 __ vmovsr(S3, R0); 1816 __ vmovsr(S3, R0);
1822 __ mov(R0, ShifterOperand(2)); 1817 __ mov(R0, ShifterOperand(2));
1823 __ vmovsr(S4, R0); 1818 __ vmovsr(S4, R0);
1824 __ mov(R0, ShifterOperand(4)); 1819 __ mov(R0, ShifterOperand(4));
1825 __ vmovsr(S5, R0); 1820 __ vmovsr(S5, R0);
1826 __ mov(R0, ShifterOperand(6)); 1821 __ mov(R0, ShifterOperand(6));
1827 __ vmovsr(S6, R0); 1822 __ vmovsr(S6, R0);
1828 __ mov(R0, ShifterOperand(8)); 1823 __ mov(R0, ShifterOperand(8));
1829 __ vmovsr(S7, R0); 1824 __ vmovsr(S7, R0);
1830 1825
1831 // TODO(zra): Replace 1 with enum value that implies 2-byte elements. 1826 __ vsubqi(kHalfword, Q2, Q1, Q0);
1832 __ vsubqi(1, Q2, Q1, Q0);
1833 1827
1834 __ vmovrs(R0, S8); 1828 __ vmovrs(R0, S8);
1835 __ vmovrs(R1, S9); 1829 __ vmovrs(R1, S9);
1836 __ vmovrs(R2, S10); 1830 __ vmovrs(R2, S10);
1837 __ vmovrs(R3, S11); 1831 __ vmovrs(R3, S11);
1838 1832
1839 __ add(R0, R0, ShifterOperand(R1)); 1833 __ add(R0, R0, ShifterOperand(R1));
1840 __ add(R0, R0, ShifterOperand(R2)); 1834 __ add(R0, R0, ShifterOperand(R2));
1841 __ add(R0, R0, ShifterOperand(R3)); 1835 __ add(R0, R0, ShifterOperand(R3));
1842 __ bx(LR); 1836 __ bx(LR);
(...skipping 23 matching lines...) Expand all
1866 __ vmovsr(S3, R0); 1860 __ vmovsr(S3, R0);
1867 __ mov(R0, ShifterOperand(2)); 1861 __ mov(R0, ShifterOperand(2));
1868 __ vmovsr(S4, R0); 1862 __ vmovsr(S4, R0);
1869 __ mov(R0, ShifterOperand(4)); 1863 __ mov(R0, ShifterOperand(4));
1870 __ vmovsr(S5, R0); 1864 __ vmovsr(S5, R0);
1871 __ mov(R0, ShifterOperand(6)); 1865 __ mov(R0, ShifterOperand(6));
1872 __ vmovsr(S6, R0); 1866 __ vmovsr(S6, R0);
1873 __ mov(R0, ShifterOperand(8)); 1867 __ mov(R0, ShifterOperand(8));
1874 __ vmovsr(S7, R0); 1868 __ vmovsr(S7, R0);
1875 1869
1876 // TODO(zra): Replace 2 with enum value that implies 4-byte elements. 1870 __ vsubqi(kWord, Q2, Q1, Q0);
1877 __ vsubqi(2, Q2, Q1, Q0);
1878 1871
1879 __ vmovrs(R0, S8); 1872 __ vmovrs(R0, S8);
1880 __ vmovrs(R1, S9); 1873 __ vmovrs(R1, S9);
1881 __ vmovrs(R2, S10); 1874 __ vmovrs(R2, S10);
1882 __ vmovrs(R3, S11); 1875 __ vmovrs(R3, S11);
1883 1876
1884 __ add(R0, R0, ShifterOperand(R1)); 1877 __ add(R0, R0, ShifterOperand(R1));
1885 __ add(R0, R0, ShifterOperand(R2)); 1878 __ add(R0, R0, ShifterOperand(R2));
1886 __ add(R0, R0, ShifterOperand(R3)); 1879 __ add(R0, R0, ShifterOperand(R3));
1887 __ bx(LR); 1880 __ bx(LR);
(...skipping 15 matching lines...) Expand all
1903 if (CPUFeatures::neon_supported()) { 1896 if (CPUFeatures::neon_supported()) {
1904 __ mov(R0, ShifterOperand(1)); 1897 __ mov(R0, ShifterOperand(1));
1905 __ vmovsr(S0, R0); 1898 __ vmovsr(S0, R0);
1906 __ mov(R0, ShifterOperand(2)); 1899 __ mov(R0, ShifterOperand(2));
1907 __ vmovsr(S2, R0); 1900 __ vmovsr(S2, R0);
1908 __ mov(R0, ShifterOperand(2)); 1901 __ mov(R0, ShifterOperand(2));
1909 __ vmovsr(S4, R0); 1902 __ vmovsr(S4, R0);
1910 __ mov(R0, ShifterOperand(4)); 1903 __ mov(R0, ShifterOperand(4));
1911 __ vmovsr(S6, R0); 1904 __ vmovsr(S6, R0);
1912 1905
1913 // TODO(zra): Replace 3 with enum value that implies 8-byte elements. 1906 __ vsubqi(kWordPair, Q2, Q1, Q0);
1914 __ vsubqi(3, Q2, Q1, Q0);
1915 1907
1916 __ vmovrs(R0, S8); 1908 __ vmovrs(R0, S8);
1917 __ vmovrs(R2, S10); 1909 __ vmovrs(R2, S10);
1918 1910
1919 __ add(R0, R0, ShifterOperand(R2)); 1911 __ add(R0, R0, ShifterOperand(R2));
1920 __ bx(LR); 1912 __ bx(LR);
1921 } else { 1913 } else {
1922 __ LoadImmediate(R0, 3); 1914 __ LoadImmediate(R0, 3);
1923 __ bx(LR); 1915 __ bx(LR);
1924 } 1916 }
(...skipping 19 matching lines...) Expand all
1944 __ vmovsr(S3, R0); 1936 __ vmovsr(S3, R0);
1945 __ mov(R0, ShifterOperand(5)); 1937 __ mov(R0, ShifterOperand(5));
1946 __ vmovsr(S4, R0); 1938 __ vmovsr(S4, R0);
1947 __ mov(R0, ShifterOperand(6)); 1939 __ mov(R0, ShifterOperand(6));
1948 __ vmovsr(S5, R0); 1940 __ vmovsr(S5, R0);
1949 __ mov(R0, ShifterOperand(7)); 1941 __ mov(R0, ShifterOperand(7));
1950 __ vmovsr(S6, R0); 1942 __ vmovsr(S6, R0);
1951 __ mov(R0, ShifterOperand(8)); 1943 __ mov(R0, ShifterOperand(8));
1952 __ vmovsr(S7, R0); 1944 __ vmovsr(S7, R0);
1953 1945
1954 // TODO(zra): Replace 0 with enum value that implies 1-byte elements. 1946 __ vmulqi(kByte, Q2, Q1, Q0);
1955 __ vmulqi(0, Q2, Q1, Q0);
1956 1947
1957 __ vmovrs(R0, S8); 1948 __ vmovrs(R0, S8);
1958 __ vmovrs(R1, S9); 1949 __ vmovrs(R1, S9);
1959 __ vmovrs(R2, S10); 1950 __ vmovrs(R2, S10);
1960 __ vmovrs(R3, S11); 1951 __ vmovrs(R3, S11);
1961 1952
1962 __ add(R0, R0, ShifterOperand(R1)); 1953 __ add(R0, R0, ShifterOperand(R1));
1963 __ add(R0, R0, ShifterOperand(R2)); 1954 __ add(R0, R0, ShifterOperand(R2));
1964 __ add(R0, R0, ShifterOperand(R3)); 1955 __ add(R0, R0, ShifterOperand(R3));
1965 __ bx(LR); 1956 __ bx(LR);
(...skipping 23 matching lines...) Expand all
1989 __ vmovsr(S3, R0); 1980 __ vmovsr(S3, R0);
1990 __ mov(R0, ShifterOperand(5)); 1981 __ mov(R0, ShifterOperand(5));
1991 __ vmovsr(S4, R0); 1982 __ vmovsr(S4, R0);
1992 __ mov(R0, ShifterOperand(6)); 1983 __ mov(R0, ShifterOperand(6));
1993 __ vmovsr(S5, R0); 1984 __ vmovsr(S5, R0);
1994 __ mov(R0, ShifterOperand(7)); 1985 __ mov(R0, ShifterOperand(7));
1995 __ vmovsr(S6, R0); 1986 __ vmovsr(S6, R0);
1996 __ mov(R0, ShifterOperand(8)); 1987 __ mov(R0, ShifterOperand(8));
1997 __ vmovsr(S7, R0); 1988 __ vmovsr(S7, R0);
1998 1989
1999 // TODO(zra): Replace 1 with enum value that implies 2-byte elements. 1990 __ vmulqi(kHalfword, Q2, Q1, Q0);
2000 __ vmulqi(1, Q2, Q1, Q0);
2001 1991
2002 __ vmovrs(R0, S8); 1992 __ vmovrs(R0, S8);
2003 __ vmovrs(R1, S9); 1993 __ vmovrs(R1, S9);
2004 __ vmovrs(R2, S10); 1994 __ vmovrs(R2, S10);
2005 __ vmovrs(R3, S11); 1995 __ vmovrs(R3, S11);
2006 1996
2007 __ add(R0, R0, ShifterOperand(R1)); 1997 __ add(R0, R0, ShifterOperand(R1));
2008 __ add(R0, R0, ShifterOperand(R2)); 1998 __ add(R0, R0, ShifterOperand(R2));
2009 __ add(R0, R0, ShifterOperand(R3)); 1999 __ add(R0, R0, ShifterOperand(R3));
2010 __ bx(LR); 2000 __ bx(LR);
(...skipping 23 matching lines...) Expand all
2034 __ vmovsr(S3, R0); 2024 __ vmovsr(S3, R0);
2035 __ mov(R0, ShifterOperand(5)); 2025 __ mov(R0, ShifterOperand(5));
2036 __ vmovsr(S4, R0); 2026 __ vmovsr(S4, R0);
2037 __ mov(R0, ShifterOperand(6)); 2027 __ mov(R0, ShifterOperand(6));
2038 __ vmovsr(S5, R0); 2028 __ vmovsr(S5, R0);
2039 __ mov(R0, ShifterOperand(7)); 2029 __ mov(R0, ShifterOperand(7));
2040 __ vmovsr(S6, R0); 2030 __ vmovsr(S6, R0);
2041 __ mov(R0, ShifterOperand(8)); 2031 __ mov(R0, ShifterOperand(8));
2042 __ vmovsr(S7, R0); 2032 __ vmovsr(S7, R0);
2043 2033
2044 // TODO(zra): Replace 2 with enum value that implies 4-byte elements. 2034 __ vmulqi(kWord, Q2, Q1, Q0);
2045 __ vmulqi(2, Q2, Q1, Q0);
2046 2035
2047 __ vmovrs(R0, S8); 2036 __ vmovrs(R0, S8);
2048 __ vmovrs(R1, S9); 2037 __ vmovrs(R1, S9);
2049 __ vmovrs(R2, S10); 2038 __ vmovrs(R2, S10);
2050 __ vmovrs(R3, S11); 2039 __ vmovrs(R3, S11);
2051 2040
2052 __ add(R0, R0, ShifterOperand(R1)); 2041 __ add(R0, R0, ShifterOperand(R1));
2053 __ add(R0, R0, ShifterOperand(R2)); 2042 __ add(R0, R0, ShifterOperand(R2));
2054 __ add(R0, R0, ShifterOperand(R3)); 2043 __ add(R0, R0, ShifterOperand(R3));
2055 __ bx(LR); 2044 __ bx(LR);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
2183 __ StoreIntoObject(R2, 2172 __ StoreIntoObject(R2,
2184 FieldAddress(R2, GrowableObjectArray::data_offset()), 2173 FieldAddress(R2, GrowableObjectArray::data_offset()),
2185 R1); 2174 R1);
2186 __ PopList((1 << CTX) | (1 << LR)); 2175 __ PopList((1 << CTX) | (1 << LR));
2187 __ Ret(); 2176 __ Ret();
2188 } 2177 }
2189 2178
2190 } // namespace dart 2179 } // namespace dart
2191 2180
2192 #endif // defined TARGET_ARCH_ARM 2181 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/disassembler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698