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/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 2107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2118 __ Bind(&miss); | 2118 __ Bind(&miss); |
2119 __ LoadIsolate(R2); | 2119 __ LoadIsolate(R2); |
2120 __ ldr(CODE_REG, Address(R2, Isolate::ic_miss_code_offset())); | 2120 __ ldr(CODE_REG, Address(R2, Isolate::ic_miss_code_offset())); |
2121 __ ldr(R1, FieldAddress(CODE_REG, Code::entry_point_offset())); | 2121 __ ldr(R1, FieldAddress(CODE_REG, Code::entry_point_offset())); |
2122 __ bx(R1); | 2122 __ bx(R1); |
2123 } | 2123 } |
2124 | 2124 |
2125 | 2125 |
2126 // Called from switchable IC calls. | 2126 // Called from switchable IC calls. |
2127 // R0: receiver | 2127 // R0: receiver |
| 2128 // R9: UnlinkedCall |
| 2129 void StubCode::GenerateUnlinkedCallStub(Assembler* assembler) { |
| 2130 __ NoMonomorphicCheckedEntry(); |
| 2131 |
| 2132 __ EnterStubFrame(); |
| 2133 __ Push(R0); // Preserve receiver. |
| 2134 |
| 2135 __ PushObject(Object::null_object()); // Result. |
| 2136 __ Push(R0); // Arg0: Receiver |
| 2137 __ Push(R9); // Arg1: UnlinkedCall |
| 2138 __ CallRuntime(kUnlinkedCallRuntimeEntry, 2); |
| 2139 __ Drop(2); |
| 2140 __ Pop(R9); // result = IC |
| 2141 |
| 2142 __ Pop(R0); // Restore receiver. |
| 2143 __ LeaveStubFrame(); |
| 2144 |
| 2145 __ ldr(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset())); |
| 2146 __ ldr(R1, FieldAddress(CODE_REG, Code::checked_entry_point_offset())); |
| 2147 __ bx(R1); |
| 2148 } |
| 2149 |
| 2150 |
| 2151 // Called from switchable IC calls. |
| 2152 // R0: receiver |
2128 // R9: SingleTargetCache | 2153 // R9: SingleTargetCache |
2129 // Passed to target: | 2154 // Passed to target: |
2130 // CODE_REG: target Code object | 2155 // CODE_REG: target Code object |
2131 void StubCode::GenerateSingleTargetCallStub(Assembler* assembler) { | 2156 void StubCode::GenerateSingleTargetCallStub(Assembler* assembler) { |
2132 __ NoMonomorphicCheckedEntry(); | 2157 __ NoMonomorphicCheckedEntry(); |
2133 | 2158 |
2134 Label miss; | 2159 Label miss; |
2135 | 2160 |
2136 __ LoadClassIdMayBeSmi(R1, R0); | 2161 __ LoadClassIdMayBeSmi(R1, R0); |
2137 __ ldrh(R2, FieldAddress(R9, SingleTargetCache::lower_limit_offset())); | 2162 __ ldrh(R2, FieldAddress(R9, SingleTargetCache::lower_limit_offset())); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2186 } | 2211 } |
2187 | 2212 |
2188 | 2213 |
2189 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { | 2214 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { |
2190 __ bkpt(0); | 2215 __ bkpt(0); |
2191 } | 2216 } |
2192 | 2217 |
2193 } // namespace dart | 2218 } // namespace dart |
2194 | 2219 |
2195 #endif // defined TARGET_ARCH_ARM | 2220 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |