OLD | NEW |
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_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
10 #include "vm/os.h" | 10 #include "vm/os.h" |
(...skipping 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1839 __ ret(); | 1839 __ ret(); |
1840 } | 1840 } |
1841 | 1841 |
1842 | 1842 |
1843 ASSEMBLER_TEST_RUN(FldrdFstrdScaledReg, test) { | 1843 ASSEMBLER_TEST_RUN(FldrdFstrdScaledReg, test) { |
1844 typedef int (*SimpleCode)(); | 1844 typedef int (*SimpleCode)(); |
1845 EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry())); | 1845 EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry())); |
1846 } | 1846 } |
1847 | 1847 |
1848 | 1848 |
| 1849 ASSEMBLER_TEST_GENERATE(Vadds, assembler) { |
| 1850 __ LoadDImmediate(V0, 0.0, kNoPP); |
| 1851 __ LoadDImmediate(V1, 1.0, kNoPP); |
| 1852 __ LoadDImmediate(V2, 2.0, kNoPP); |
| 1853 __ LoadDImmediate(V3, 3.0, kNoPP); |
| 1854 |
| 1855 __ fcvtsd(V0, V0); |
| 1856 __ fcvtsd(V1, V1); |
| 1857 __ fcvtsd(V2, V2); |
| 1858 __ fcvtsd(V3, V3); |
| 1859 |
| 1860 const int sword_bytes = 1 << Log2OperandSizeBytes(kSWord); |
| 1861 const int qword_bytes = 1 << Log2OperandSizeBytes(kQWord); |
| 1862 __ fstrs(V0, Address(SP, -1 * sword_bytes, Address::PreIndex)); |
| 1863 __ fstrs(V1, Address(SP, -1 * sword_bytes, Address::PreIndex)); |
| 1864 __ fstrs(V2, Address(SP, -1 * sword_bytes, Address::PreIndex)); |
| 1865 __ fstrs(V3, Address(SP, -1 * sword_bytes, Address::PreIndex)); |
| 1866 |
| 1867 __ fldrq(V4, Address(SP, 1 * qword_bytes, Address::PostIndex)); |
| 1868 __ vadds(V5, V4, V4); |
| 1869 __ fstrq(V5, Address(SP, -1 * qword_bytes, Address::PreIndex)); |
| 1870 |
| 1871 __ fldrs(V0, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 1872 __ fldrs(V1, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 1873 __ fldrs(V2, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 1874 __ fldrs(V3, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 1875 |
| 1876 __ fcvtds(V0, V0); |
| 1877 __ fcvtds(V1, V1); |
| 1878 __ fcvtds(V2, V2); |
| 1879 __ fcvtds(V3, V3); |
| 1880 |
| 1881 __ faddd(V0, V0, V1); |
| 1882 __ faddd(V0, V0, V2); |
| 1883 __ faddd(V0, V0, V3); |
| 1884 __ ret(); |
| 1885 } |
| 1886 |
| 1887 |
| 1888 ASSEMBLER_TEST_RUN(Vadds, test) { |
| 1889 typedef int (*SimpleCode)(); |
| 1890 EXPECT_EQ(12.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry())); |
| 1891 } |
| 1892 |
| 1893 |
| 1894 ASSEMBLER_TEST_GENERATE(Vsubs, assembler) { |
| 1895 __ LoadDImmediate(V0, 0.0, kNoPP); |
| 1896 __ LoadDImmediate(V1, 1.0, kNoPP); |
| 1897 __ LoadDImmediate(V2, 2.0, kNoPP); |
| 1898 __ LoadDImmediate(V3, 3.0, kNoPP); |
| 1899 __ LoadDImmediate(V5, 0.0, kNoPP); |
| 1900 |
| 1901 __ fcvtsd(V0, V0); |
| 1902 __ fcvtsd(V1, V1); |
| 1903 __ fcvtsd(V2, V2); |
| 1904 __ fcvtsd(V3, V3); |
| 1905 |
| 1906 const int sword_bytes = 1 << Log2OperandSizeBytes(kSWord); |
| 1907 const int qword_bytes = 1 << Log2OperandSizeBytes(kQWord); |
| 1908 __ fstrs(V0, Address(SP, -1 * sword_bytes, Address::PreIndex)); |
| 1909 __ fstrs(V1, Address(SP, -1 * sword_bytes, Address::PreIndex)); |
| 1910 __ fstrs(V2, Address(SP, -1 * sword_bytes, Address::PreIndex)); |
| 1911 __ fstrs(V3, Address(SP, -1 * sword_bytes, Address::PreIndex)); |
| 1912 |
| 1913 __ fldrq(V4, Address(SP, 1 * qword_bytes, Address::PostIndex)); |
| 1914 __ vsubs(V5, V5, V4); |
| 1915 __ fstrq(V5, Address(SP, -1 * qword_bytes, Address::PreIndex)); |
| 1916 |
| 1917 __ fldrs(V0, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 1918 __ fldrs(V1, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 1919 __ fldrs(V2, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 1920 __ fldrs(V3, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 1921 |
| 1922 __ fcvtds(V0, V0); |
| 1923 __ fcvtds(V1, V1); |
| 1924 __ fcvtds(V2, V2); |
| 1925 __ fcvtds(V3, V3); |
| 1926 |
| 1927 __ faddd(V0, V0, V1); |
| 1928 __ faddd(V0, V0, V2); |
| 1929 __ faddd(V0, V0, V3); |
| 1930 __ ret(); |
| 1931 } |
| 1932 |
| 1933 |
| 1934 ASSEMBLER_TEST_RUN(Vsubs, test) { |
| 1935 typedef int (*SimpleCode)(); |
| 1936 EXPECT_EQ(-6.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry())); |
| 1937 } |
| 1938 |
| 1939 |
| 1940 ASSEMBLER_TEST_GENERATE(Vmuls, assembler) { |
| 1941 __ LoadDImmediate(V0, 0.0, kNoPP); |
| 1942 __ LoadDImmediate(V1, 1.0, kNoPP); |
| 1943 __ LoadDImmediate(V2, 2.0, kNoPP); |
| 1944 __ LoadDImmediate(V3, 3.0, kNoPP); |
| 1945 |
| 1946 __ fcvtsd(V0, V0); |
| 1947 __ fcvtsd(V1, V1); |
| 1948 __ fcvtsd(V2, V2); |
| 1949 __ fcvtsd(V3, V3); |
| 1950 |
| 1951 const int sword_bytes = 1 << Log2OperandSizeBytes(kSWord); |
| 1952 const int qword_bytes = 1 << Log2OperandSizeBytes(kQWord); |
| 1953 __ fstrs(V0, Address(SP, -1 * sword_bytes, Address::PreIndex)); |
| 1954 __ fstrs(V1, Address(SP, -1 * sword_bytes, Address::PreIndex)); |
| 1955 __ fstrs(V2, Address(SP, -1 * sword_bytes, Address::PreIndex)); |
| 1956 __ fstrs(V3, Address(SP, -1 * sword_bytes, Address::PreIndex)); |
| 1957 |
| 1958 __ fldrq(V4, Address(SP, 1 * qword_bytes, Address::PostIndex)); |
| 1959 __ vmuls(V5, V4, V4); |
| 1960 __ fstrq(V5, Address(SP, -1 * qword_bytes, Address::PreIndex)); |
| 1961 |
| 1962 __ fldrs(V0, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 1963 __ fldrs(V1, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 1964 __ fldrs(V2, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 1965 __ fldrs(V3, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 1966 |
| 1967 __ fcvtds(V0, V0); |
| 1968 __ fcvtds(V1, V1); |
| 1969 __ fcvtds(V2, V2); |
| 1970 __ fcvtds(V3, V3); |
| 1971 |
| 1972 __ faddd(V0, V0, V1); |
| 1973 __ faddd(V0, V0, V2); |
| 1974 __ faddd(V0, V0, V3); |
| 1975 __ ret(); |
| 1976 } |
| 1977 |
| 1978 |
| 1979 ASSEMBLER_TEST_RUN(Vmuls, test) { |
| 1980 typedef int (*SimpleCode)(); |
| 1981 EXPECT_EQ(14.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry())); |
| 1982 } |
| 1983 |
| 1984 |
| 1985 ASSEMBLER_TEST_GENERATE(Vdivs, assembler) { |
| 1986 __ LoadDImmediate(V0, 0.0, kNoPP); |
| 1987 __ LoadDImmediate(V1, 1.0, kNoPP); |
| 1988 __ LoadDImmediate(V2, 2.0, kNoPP); |
| 1989 __ LoadDImmediate(V3, 3.0, kNoPP); |
| 1990 |
| 1991 __ fcvtsd(V0, V0); |
| 1992 __ fcvtsd(V1, V1); |
| 1993 __ fcvtsd(V2, V2); |
| 1994 __ fcvtsd(V3, V3); |
| 1995 |
| 1996 const int sword_bytes = 1 << Log2OperandSizeBytes(kSWord); |
| 1997 const int qword_bytes = 1 << Log2OperandSizeBytes(kQWord); |
| 1998 __ fstrs(V0, Address(SP, -1 * sword_bytes, Address::PreIndex)); |
| 1999 __ fstrs(V1, Address(SP, -1 * sword_bytes, Address::PreIndex)); |
| 2000 __ fstrs(V2, Address(SP, -1 * sword_bytes, Address::PreIndex)); |
| 2001 __ fstrs(V3, Address(SP, -1 * sword_bytes, Address::PreIndex)); |
| 2002 |
| 2003 __ fldrq(V4, Address(SP, 1 * qword_bytes, Address::PostIndex)); |
| 2004 __ vdivs(V5, V4, V4); |
| 2005 __ fstrq(V5, Address(SP, -1 * qword_bytes, Address::PreIndex)); |
| 2006 |
| 2007 __ fldrs(V3, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 2008 __ fldrs(V2, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 2009 __ fldrs(V1, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 2010 __ fldrs(V0, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 2011 |
| 2012 __ fcvtds(V0, V0); |
| 2013 __ fcvtds(V1, V1); |
| 2014 __ fcvtds(V2, V2); |
| 2015 __ fcvtds(V3, V3); |
| 2016 |
| 2017 __ faddd(V0, V1, V1); |
| 2018 __ faddd(V0, V0, V2); |
| 2019 __ faddd(V0, V0, V3); |
| 2020 __ ret(); |
| 2021 } |
| 2022 |
| 2023 |
| 2024 ASSEMBLER_TEST_RUN(Vdivs, test) { |
| 2025 typedef int (*SimpleCode)(); |
| 2026 EXPECT_EQ(4.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry())); |
| 2027 } |
| 2028 |
| 2029 |
| 2030 |
| 2031 ASSEMBLER_TEST_GENERATE(Vaddd, assembler) { |
| 2032 __ LoadDImmediate(V0, 2.0, kNoPP); |
| 2033 __ LoadDImmediate(V1, 3.0, kNoPP); |
| 2034 |
| 2035 const int dword_bytes = 1 << Log2OperandSizeBytes(kDWord); |
| 2036 const int qword_bytes = 1 << Log2OperandSizeBytes(kQWord); |
| 2037 __ fstrd(V0, Address(SP, -1 * dword_bytes, Address::PreIndex)); |
| 2038 __ fstrd(V1, Address(SP, -1 * dword_bytes, Address::PreIndex)); |
| 2039 |
| 2040 __ fldrq(V4, Address(SP, 1 * qword_bytes, Address::PostIndex)); |
| 2041 __ vaddd(V5, V4, V4); |
| 2042 __ fstrq(V5, Address(SP, -1 * qword_bytes, Address::PreIndex)); |
| 2043 |
| 2044 __ fldrd(V1, Address(SP, 1 * dword_bytes, Address::PostIndex)); |
| 2045 __ fldrd(V0, Address(SP, 1 * dword_bytes, Address::PostIndex)); |
| 2046 |
| 2047 __ faddd(V0, V0, V1); |
| 2048 __ ret(); |
| 2049 } |
| 2050 |
| 2051 |
| 2052 ASSEMBLER_TEST_RUN(Vaddd, test) { |
| 2053 typedef int (*SimpleCode)(); |
| 2054 EXPECT_EQ(10.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry())); |
| 2055 } |
| 2056 |
| 2057 |
| 2058 ASSEMBLER_TEST_GENERATE(Vsubd, assembler) { |
| 2059 __ LoadDImmediate(V0, 2.0, kNoPP); |
| 2060 __ LoadDImmediate(V1, 3.0, kNoPP); |
| 2061 __ LoadDImmediate(V5, 0.0, kNoPP); |
| 2062 |
| 2063 const int dword_bytes = 1 << Log2OperandSizeBytes(kDWord); |
| 2064 const int qword_bytes = 1 << Log2OperandSizeBytes(kQWord); |
| 2065 __ fstrd(V0, Address(SP, -1 * dword_bytes, Address::PreIndex)); |
| 2066 __ fstrd(V1, Address(SP, -1 * dword_bytes, Address::PreIndex)); |
| 2067 |
| 2068 __ fldrq(V4, Address(SP, 1 * qword_bytes, Address::PostIndex)); |
| 2069 __ vsubd(V5, V5, V4); |
| 2070 __ fstrq(V5, Address(SP, -1 * qword_bytes, Address::PreIndex)); |
| 2071 |
| 2072 __ fldrd(V1, Address(SP, 1 * dword_bytes, Address::PostIndex)); |
| 2073 __ fldrd(V0, Address(SP, 1 * dword_bytes, Address::PostIndex)); |
| 2074 |
| 2075 __ faddd(V0, V0, V1); |
| 2076 __ ret(); |
| 2077 } |
| 2078 |
| 2079 |
| 2080 ASSEMBLER_TEST_RUN(Vsubd, test) { |
| 2081 typedef int (*SimpleCode)(); |
| 2082 EXPECT_EQ(-5.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry())); |
| 2083 } |
| 2084 |
| 2085 |
| 2086 ASSEMBLER_TEST_GENERATE(Vmuld, assembler) { |
| 2087 __ LoadDImmediate(V0, 2.0, kNoPP); |
| 2088 __ LoadDImmediate(V1, 3.0, kNoPP); |
| 2089 |
| 2090 const int dword_bytes = 1 << Log2OperandSizeBytes(kDWord); |
| 2091 const int qword_bytes = 1 << Log2OperandSizeBytes(kQWord); |
| 2092 __ fstrd(V0, Address(SP, -1 * dword_bytes, Address::PreIndex)); |
| 2093 __ fstrd(V1, Address(SP, -1 * dword_bytes, Address::PreIndex)); |
| 2094 |
| 2095 __ fldrq(V4, Address(SP, 1 * qword_bytes, Address::PostIndex)); |
| 2096 __ vmuld(V5, V4, V4); |
| 2097 __ fstrq(V5, Address(SP, -1 * qword_bytes, Address::PreIndex)); |
| 2098 |
| 2099 __ fldrd(V1, Address(SP, 1 * dword_bytes, Address::PostIndex)); |
| 2100 __ fldrd(V0, Address(SP, 1 * dword_bytes, Address::PostIndex)); |
| 2101 |
| 2102 __ faddd(V0, V0, V1); |
| 2103 __ ret(); |
| 2104 } |
| 2105 |
| 2106 |
| 2107 ASSEMBLER_TEST_RUN(Vmuld, test) { |
| 2108 typedef int (*SimpleCode)(); |
| 2109 EXPECT_EQ(13.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry())); |
| 2110 } |
| 2111 |
| 2112 |
| 2113 ASSEMBLER_TEST_GENERATE(Vdivd, assembler) { |
| 2114 __ LoadDImmediate(V0, 2.0, kNoPP); |
| 2115 __ LoadDImmediate(V1, 3.0, kNoPP); |
| 2116 |
| 2117 const int dword_bytes = 1 << Log2OperandSizeBytes(kDWord); |
| 2118 const int qword_bytes = 1 << Log2OperandSizeBytes(kQWord); |
| 2119 __ fstrd(V0, Address(SP, -1 * dword_bytes, Address::PreIndex)); |
| 2120 __ fstrd(V1, Address(SP, -1 * dword_bytes, Address::PreIndex)); |
| 2121 |
| 2122 __ fldrq(V4, Address(SP, 1 * qword_bytes, Address::PostIndex)); |
| 2123 __ vdivd(V5, V4, V4); |
| 2124 __ fstrq(V5, Address(SP, -1 * qword_bytes, Address::PreIndex)); |
| 2125 |
| 2126 __ fldrd(V1, Address(SP, 1 * dword_bytes, Address::PostIndex)); |
| 2127 __ fldrd(V0, Address(SP, 1 * dword_bytes, Address::PostIndex)); |
| 2128 |
| 2129 __ faddd(V0, V0, V1); |
| 2130 __ ret(); |
| 2131 } |
| 2132 |
| 2133 |
| 2134 ASSEMBLER_TEST_RUN(Vdivd, test) { |
| 2135 typedef int (*SimpleCode)(); |
| 2136 EXPECT_EQ(2.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry())); |
| 2137 } |
| 2138 |
| 2139 |
| 2140 ASSEMBLER_TEST_GENERATE(Vdupd, assembler) { |
| 2141 __ LoadDImmediate(V0, 21.0, kNoPP); |
| 2142 __ vdupd(V1, V0, 0); |
| 2143 |
| 2144 const int dword_bytes = 1 << Log2OperandSizeBytes(kDWord); |
| 2145 const int qword_bytes = 1 << Log2OperandSizeBytes(kQWord); |
| 2146 __ fstrq(V1, Address(SP, -1 * qword_bytes, Address::PreIndex)); |
| 2147 |
| 2148 __ fldrd(V2, Address(SP, 1 * dword_bytes, Address::PostIndex)); |
| 2149 __ fldrd(V3, Address(SP, 1 * dword_bytes, Address::PostIndex)); |
| 2150 |
| 2151 __ faddd(V0, V2, V3); |
| 2152 __ ret(); |
| 2153 } |
| 2154 |
| 2155 |
| 2156 ASSEMBLER_TEST_RUN(Vdupd, test) { |
| 2157 typedef int (*SimpleCode)(); |
| 2158 EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry())); |
| 2159 } |
| 2160 |
| 2161 |
| 2162 ASSEMBLER_TEST_GENERATE(Vdups, assembler) { |
| 2163 __ LoadDImmediate(V0, 21.0, kNoPP); |
| 2164 __ fcvtsd(V0, V0); |
| 2165 __ vdups(V1, V0, 0); |
| 2166 |
| 2167 |
| 2168 const int sword_bytes = 1 << Log2OperandSizeBytes(kSWord); |
| 2169 const int qword_bytes = 1 << Log2OperandSizeBytes(kQWord); |
| 2170 __ fstrq(V1, Address(SP, -1 * qword_bytes, Address::PreIndex)); |
| 2171 |
| 2172 __ fldrs(V3, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 2173 __ fldrs(V2, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 2174 __ fldrs(V1, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 2175 __ fldrs(V0, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 2176 |
| 2177 __ fcvtds(V0, V0); |
| 2178 __ fcvtds(V1, V1); |
| 2179 __ fcvtds(V2, V2); |
| 2180 __ fcvtds(V3, V3); |
| 2181 |
| 2182 __ faddd(V0, V1, V1); |
| 2183 __ faddd(V0, V0, V2); |
| 2184 __ faddd(V0, V0, V3); |
| 2185 __ ret(); |
| 2186 } |
| 2187 |
| 2188 |
| 2189 ASSEMBLER_TEST_RUN(Vdups, test) { |
| 2190 typedef int (*SimpleCode)(); |
| 2191 EXPECT_EQ(84.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry())); |
| 2192 } |
| 2193 |
| 2194 |
| 2195 ASSEMBLER_TEST_GENERATE(Vinsd, assembler) { |
| 2196 __ LoadDImmediate(V5, 42.0, kNoPP); |
| 2197 __ vinsd(V1, 1, V5, 0); // V1[1] <- V0[0]. |
| 2198 |
| 2199 const int dword_bytes = 1 << Log2OperandSizeBytes(kDWord); |
| 2200 const int qword_bytes = 1 << Log2OperandSizeBytes(kQWord); |
| 2201 __ fstrq(V1, Address(SP, -1 * qword_bytes, Address::PreIndex)); |
| 2202 |
| 2203 __ fldrd(V2, Address(SP, 1 * dword_bytes, Address::PostIndex)); |
| 2204 __ fldrd(V3, Address(SP, 1 * dword_bytes, Address::PostIndex)); |
| 2205 |
| 2206 __ fmovdd(V0, V3); |
| 2207 __ ret(); |
| 2208 } |
| 2209 |
| 2210 |
| 2211 ASSEMBLER_TEST_RUN(Vinsd, test) { |
| 2212 typedef int (*SimpleCode)(); |
| 2213 EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry())); |
| 2214 } |
| 2215 |
| 2216 |
| 2217 ASSEMBLER_TEST_GENERATE(Vinss, assembler) { |
| 2218 __ LoadDImmediate(V0, 21.0, kNoPP); |
| 2219 __ fcvtsd(V0, V0); |
| 2220 __ vinss(V1, 3, V0, 0); |
| 2221 __ vinss(V1, 1, V0, 0); |
| 2222 |
| 2223 const int sword_bytes = 1 << Log2OperandSizeBytes(kSWord); |
| 2224 const int qword_bytes = 1 << Log2OperandSizeBytes(kQWord); |
| 2225 __ fstrq(V1, Address(SP, -1 * qword_bytes, Address::PreIndex)); |
| 2226 |
| 2227 __ fldrs(V3, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 2228 __ fldrs(V2, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 2229 __ fldrs(V1, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 2230 __ fldrs(V0, Address(SP, 1 * sword_bytes, Address::PostIndex)); |
| 2231 |
| 2232 __ fcvtds(V0, V0); |
| 2233 __ fcvtds(V1, V1); |
| 2234 __ fcvtds(V2, V2); |
| 2235 __ fcvtds(V3, V3); |
| 2236 |
| 2237 __ faddd(V0, V0, V1); |
| 2238 __ faddd(V0, V0, V2); |
| 2239 __ faddd(V0, V0, V3); |
| 2240 __ ret(); |
| 2241 } |
| 2242 |
| 2243 |
| 2244 ASSEMBLER_TEST_RUN(Vinss, test) { |
| 2245 typedef int (*SimpleCode)(); |
| 2246 EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry())); |
| 2247 } |
| 2248 |
| 2249 |
1849 // Called from assembler_test.cc. | 2250 // Called from assembler_test.cc. |
1850 // LR: return address. | 2251 // LR: return address. |
1851 // R0: context. | 2252 // R0: context. |
1852 // R1: value. | 2253 // R1: value. |
1853 // R2: growable array. | 2254 // R2: growable array. |
1854 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) { | 2255 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) { |
1855 __ TagAndPushPP(); | 2256 __ TagAndPushPP(); |
1856 __ LoadPoolPointer(PP); | 2257 __ LoadPoolPointer(PP); |
1857 __ Push(CTX); | 2258 __ Push(CTX); |
1858 __ Push(LR); | 2259 __ Push(LR); |
1859 __ mov(CTX, R0); | 2260 __ mov(CTX, R0); |
1860 __ StoreIntoObject(R2, | 2261 __ StoreIntoObject(R2, |
1861 FieldAddress(R2, GrowableObjectArray::data_offset()), | 2262 FieldAddress(R2, GrowableObjectArray::data_offset()), |
1862 R1); | 2263 R1); |
1863 __ Pop(LR); | 2264 __ Pop(LR); |
1864 __ Pop(CTX); | 2265 __ Pop(CTX); |
1865 __ PopAndUntagPP(); | 2266 __ PopAndUntagPP(); |
1866 __ ret(); | 2267 __ ret(); |
1867 } | 2268 } |
1868 | 2269 |
1869 } // namespace dart | 2270 } // namespace dart |
1870 | 2271 |
1871 #endif // defined(TARGET_ARCH_ARM64) | 2272 #endif // defined(TARGET_ARCH_ARM64) |
OLD | NEW |