| 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 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2106 __ ret(); | 2106 __ ret(); |
| 2107 } | 2107 } |
| 2108 | 2108 |
| 2109 | 2109 |
| 2110 ASSEMBLER_TEST_RUN(Fmovdr, test) { | 2110 ASSEMBLER_TEST_RUN(Fmovdr, test) { |
| 2111 typedef double (*DoubleReturn)() DART_UNUSED; | 2111 typedef double (*DoubleReturn)() DART_UNUSED; |
| 2112 EXPECT_EQ(1.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry())); | 2112 EXPECT_EQ(1.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry())); |
| 2113 } | 2113 } |
| 2114 | 2114 |
| 2115 | 2115 |
| 2116 ASSEMBLER_TEST_GENERATE(Fmovrs, assembler) { |
| 2117 __ LoadDImmediate(V2, 1.0); |
| 2118 __ fcvtsd(V1, V2); |
| 2119 __ fmovrs(R0, V1); |
| 2120 __ ret(); |
| 2121 } |
| 2122 |
| 2123 |
| 2124 ASSEMBLER_TEST_RUN(Fmovrs, test) { |
| 2125 typedef int64_t (*Int64Return)() DART_UNUSED; |
| 2126 int64_t result = EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()); |
| 2127 const uint32_t one = bit_cast<uint32_t, float>(1.0f); |
| 2128 EXPECT_EQ(one, static_cast<uint32_t>(result)); |
| 2129 } |
| 2130 |
| 2131 |
| 2132 ASSEMBLER_TEST_GENERATE(Fmovsr, assembler) { |
| 2133 __ LoadImmediate(R2, bit_cast<uint32_t, float>(1.0f)); |
| 2134 __ fmovsr(V1, R2); |
| 2135 __ fmovrs(R0, V1); |
| 2136 __ ret(); |
| 2137 } |
| 2138 |
| 2139 |
| 2140 ASSEMBLER_TEST_RUN(Fmovsr, test) { |
| 2141 typedef int64_t (*Int64Return)() DART_UNUSED; |
| 2142 int64_t result = EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()); |
| 2143 const uint32_t one = bit_cast<uint32_t, float>(1.0f); |
| 2144 EXPECT_EQ(one, static_cast<uint32_t>(result)); |
| 2145 } |
| 2146 |
| 2147 |
| 2116 ASSEMBLER_TEST_GENERATE(FldrdFstrdPrePostIndex, assembler) { | 2148 ASSEMBLER_TEST_GENERATE(FldrdFstrdPrePostIndex, assembler) { |
| 2117 __ SetupDartSP(); | 2149 __ SetupDartSP(); |
| 2118 __ LoadDImmediate(V1, 42.0); | 2150 __ LoadDImmediate(V1, 42.0); |
| 2119 __ fstrd(V1, Address(SP, -1 * kWordSize, Address::PreIndex)); | 2151 __ fstrd(V1, Address(SP, -1 * kWordSize, Address::PreIndex)); |
| 2120 __ fldrd(V0, Address(SP, 1 * kWordSize, Address::PostIndex)); | 2152 __ fldrd(V0, Address(SP, 1 * kWordSize, Address::PostIndex)); |
| 2121 __ RestoreCSP(); | 2153 __ RestoreCSP(); |
| 2122 __ ret(); | 2154 __ ret(); |
| 2123 } | 2155 } |
| 2124 | 2156 |
| 2125 | 2157 |
| (...skipping 1666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3792 __ Pop(LR); | 3824 __ Pop(LR); |
| 3793 __ Pop(THR); | 3825 __ Pop(THR); |
| 3794 __ Pop(CODE_REG); | 3826 __ Pop(CODE_REG); |
| 3795 __ RestoreCSP(); | 3827 __ RestoreCSP(); |
| 3796 __ ret(); | 3828 __ ret(); |
| 3797 } | 3829 } |
| 3798 | 3830 |
| 3799 } // namespace dart | 3831 } // namespace dart |
| 3800 | 3832 |
| 3801 #endif // defined(TARGET_ARCH_ARM64) | 3833 #endif // defined(TARGET_ARCH_ARM64) |
| OLD | NEW |