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 1819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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). | 1839 // LR: return address (Dart code). |
1840 // R5: IC data (unoptimized static call). | |
1841 void StubCode::GenerateBreakpointStaticStub(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 __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null())); | |
1846 // Preserve arguments descriptor and make room for result. | |
1847 __ PushList((1 << R0) | (1 << R5)); | |
1848 __ CallRuntime(kBreakpointStaticHandlerRuntimeEntry, 0); | |
1849 // Pop code object result and restore arguments descriptor. | |
1850 __ PopList((1 << R0) | (1 << R5)); | |
1851 __ LeaveStubFrame(); | |
1852 | |
1853 // Now call the static function. The breakpoint handler function | |
1854 // ensures that the call target is compiled. | |
1855 __ ldr(R0, FieldAddress(R0, Code::instructions_offset())); | |
1856 __ AddImmediate(R0, Instructions::HeaderSize() - kHeapObjectTag); | |
1857 // Load arguments descriptor into R4. | |
1858 __ ldr(R4, FieldAddress(R5, ICData::arguments_descriptor_offset())); | |
1859 __ bx(R0); | |
1860 } | |
1861 | |
1862 | |
1863 // LR: return address (Dart code). | |
1864 // R5: inline cache data array. | 1840 // R5: inline cache data array. |
1865 void StubCode::GenerateBreakpointDynamicStub(Assembler* assembler) { | 1841 void StubCode::GenerateBreakpointDynamicStub(Assembler* assembler) { |
1866 // Create a stub frame as we are pushing some objects on the stack before | 1842 // Create a stub frame as we are pushing some objects on the stack before |
1867 // calling into the runtime. | 1843 // calling into the runtime. |
1868 __ EnterStubFrame(); | 1844 __ EnterStubFrame(); |
1869 __ Push(R5); | 1845 __ Push(R5); |
1870 __ CallRuntime(kBreakpointDynamicHandlerRuntimeEntry, 0); | 1846 __ CallRuntime(kBreakpointDynamicHandlerRuntimeEntry, 0); |
1871 __ Pop(R5); | 1847 __ Pop(R5); |
1872 __ LeaveStubFrame(); | 1848 __ LeaveStubFrame(); |
1873 | 1849 |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2167 const Register right = R0; | 2143 const Register right = R0; |
2168 __ ldr(left, Address(SP, 1 * kWordSize)); | 2144 __ ldr(left, Address(SP, 1 * kWordSize)); |
2169 __ ldr(right, Address(SP, 0 * kWordSize)); | 2145 __ ldr(right, Address(SP, 0 * kWordSize)); |
2170 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 2146 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
2171 __ Ret(); | 2147 __ Ret(); |
2172 } | 2148 } |
2173 | 2149 |
2174 } // namespace dart | 2150 } // namespace dart |
2175 | 2151 |
2176 #endif // defined TARGET_ARCH_ARM | 2152 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |