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 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1829 __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null())); | 1829 __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null())); |
1830 // Preserve arguments descriptor and make room for result. | 1830 // Preserve arguments descriptor and make room for result. |
1831 __ PushList((1 << R0) | (1 << R4) | (1 << R5)); | 1831 __ PushList((1 << R0) | (1 << R4) | (1 << R5)); |
1832 __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry, 0); | 1832 __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry, 0); |
1833 __ PopList((1 << R0) | (1 << R4) | (1 << R5)); | 1833 __ PopList((1 << R0) | (1 << R4) | (1 << R5)); |
1834 __ LeaveStubFrame(); | 1834 __ LeaveStubFrame(); |
1835 __ bx(R0); | 1835 __ bx(R0); |
1836 } | 1836 } |
1837 | 1837 |
1838 | 1838 |
1839 // LR: return address (Dart code). | |
1840 // R5: inline cache data array. | |
1841 void StubCode::GenerateBreakpointDynamicStub(Assembler* assembler) { | |
1842 // Create a stub frame as we are pushing some objects on the stack before | |
1843 // calling into the runtime. | |
1844 __ EnterStubFrame(); | |
1845 __ Push(R5); | |
1846 __ CallRuntime(kBreakpointDynamicHandlerRuntimeEntry, 0); | |
1847 __ Pop(R5); | |
1848 __ LeaveStubFrame(); | |
1849 | |
1850 // Find out which dispatch stub to call. | |
1851 __ ldr(IP, FieldAddress(R5, ICData::num_args_tested_offset())); | |
1852 __ cmp(IP, ShifterOperand(1)); | |
1853 __ Branch(&StubCode::OneArgCheckInlineCacheLabel(), EQ); | |
1854 __ cmp(IP, ShifterOperand(2)); | |
1855 __ Branch(&StubCode::TwoArgsCheckInlineCacheLabel(), EQ); | |
1856 __ cmp(IP, ShifterOperand(3)); | |
1857 __ Branch(&StubCode::ThreeArgsCheckInlineCacheLabel(), EQ); | |
1858 __ Stop("Unsupported number of arguments tested."); | |
1859 } | |
1860 | |
1861 | |
1862 // Called only from unoptimized code. All relevant registers have been saved. | 1839 // Called only from unoptimized code. All relevant registers have been saved. |
1863 void StubCode::GenerateDebugStepCheckStub( | 1840 void StubCode::GenerateDebugStepCheckStub( |
1864 Assembler* assembler) { | 1841 Assembler* assembler) { |
1865 // Check single stepping. | 1842 // Check single stepping. |
1866 Label not_stepping; | 1843 Label not_stepping; |
1867 __ ldr(R1, FieldAddress(CTX, Context::isolate_offset())); | 1844 __ ldr(R1, FieldAddress(CTX, Context::isolate_offset())); |
1868 __ ldrb(R1, Address(R1, Isolate::single_step_offset())); | 1845 __ ldrb(R1, Address(R1, Isolate::single_step_offset())); |
1869 __ CompareImmediate(R1, 0); | 1846 __ CompareImmediate(R1, 0); |
1870 __ b(¬_stepping, EQ); | 1847 __ b(¬_stepping, EQ); |
1871 __ EnterStubFrame(); | 1848 __ EnterStubFrame(); |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2143 const Register right = R0; | 2120 const Register right = R0; |
2144 __ ldr(left, Address(SP, 1 * kWordSize)); | 2121 __ ldr(left, Address(SP, 1 * kWordSize)); |
2145 __ ldr(right, Address(SP, 0 * kWordSize)); | 2122 __ ldr(right, Address(SP, 0 * kWordSize)); |
2146 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 2123 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
2147 __ Ret(); | 2124 __ Ret(); |
2148 } | 2125 } |
2149 | 2126 |
2150 } // namespace dart | 2127 } // namespace dart |
2151 | 2128 |
2152 #endif // defined TARGET_ARCH_ARM | 2129 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |