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_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1893 __ cmp(IP, ShifterOperand(1)); | 1893 __ cmp(IP, ShifterOperand(1)); |
1894 __ Branch(&StubCode::OneArgCheckInlineCacheLabel(), EQ); | 1894 __ Branch(&StubCode::OneArgCheckInlineCacheLabel(), EQ); |
1895 __ cmp(IP, ShifterOperand(2)); | 1895 __ cmp(IP, ShifterOperand(2)); |
1896 __ Branch(&StubCode::TwoArgsCheckInlineCacheLabel(), EQ); | 1896 __ Branch(&StubCode::TwoArgsCheckInlineCacheLabel(), EQ); |
1897 __ cmp(IP, ShifterOperand(3)); | 1897 __ cmp(IP, ShifterOperand(3)); |
1898 __ Branch(&StubCode::ThreeArgsCheckInlineCacheLabel(), EQ); | 1898 __ Branch(&StubCode::ThreeArgsCheckInlineCacheLabel(), EQ); |
1899 __ Stop("Unsupported number of arguments tested."); | 1899 __ Stop("Unsupported number of arguments tested."); |
1900 } | 1900 } |
1901 | 1901 |
1902 | 1902 |
| 1903 // Called only from unoptimized code. All relevant registers have been saved. |
| 1904 void StubCode::GenerateDebugStepCheckStub( |
| 1905 Assembler* assembler) { |
| 1906 // Check single stepping. |
| 1907 Label not_stepping; |
| 1908 __ ldr(R1, FieldAddress(CTX, Context::isolate_offset())); |
| 1909 __ ldrb(R1, Address(R1, Isolate::single_step_offset())); |
| 1910 __ CompareImmediate(R1, 0); |
| 1911 __ b(¬_stepping, EQ); |
| 1912 __ EnterStubFrame(); |
| 1913 __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0); |
| 1914 __ LeaveStubFrame(); |
| 1915 __ Bind(¬_stepping); |
| 1916 __ Ret(); |
| 1917 } |
| 1918 |
| 1919 |
1903 // Used to check class and type arguments. Arguments passed in registers: | 1920 // Used to check class and type arguments. Arguments passed in registers: |
1904 // LR: return address. | 1921 // LR: return address. |
1905 // R0: instance (must be preserved). | 1922 // R0: instance (must be preserved). |
1906 // R1: instantiator type arguments or NULL. | 1923 // R1: instantiator type arguments or NULL. |
1907 // R2: cache array. | 1924 // R2: cache array. |
1908 // Result in R1: null -> not found, otherwise result (true or false). | 1925 // Result in R1: null -> not found, otherwise result (true or false). |
1909 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) { | 1926 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) { |
1910 ASSERT((1 <= n) && (n <= 3)); | 1927 ASSERT((1 <= n) && (n <= 3)); |
1911 if (n > 1) { | 1928 if (n > 1) { |
1912 // Get instance type arguments. | 1929 // Get instance type arguments. |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2167 const Register right = R0; | 2184 const Register right = R0; |
2168 __ ldr(left, Address(SP, 1 * kWordSize)); | 2185 __ ldr(left, Address(SP, 1 * kWordSize)); |
2169 __ ldr(right, Address(SP, 0 * kWordSize)); | 2186 __ ldr(right, Address(SP, 0 * kWordSize)); |
2170 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 2187 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
2171 __ Ret(); | 2188 __ Ret(); |
2172 } | 2189 } |
2173 | 2190 |
2174 } // namespace dart | 2191 } // namespace dart |
2175 | 2192 |
2176 #endif // defined TARGET_ARCH_ARM | 2193 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |