| 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" |
| 11 #include "vm/dart_entry.h" | 11 #include "vm/dart_entry.h" |
| 12 #include "vm/flow_graph_compiler.h" | 12 #include "vm/flow_graph_compiler.h" |
| 13 #include "vm/heap.h" | 13 #include "vm/heap.h" |
| 14 #include "vm/instructions.h" | 14 #include "vm/instructions.h" |
| 15 #include "vm/object_store.h" | 15 #include "vm/object_store.h" |
| 16 #include "vm/stack_frame.h" | 16 #include "vm/stack_frame.h" |
| 17 #include "vm/stub_code.h" | 17 #include "vm/stub_code.h" |
| 18 #include "vm/tags.h" |
| 18 | 19 |
| 19 #define __ assembler-> | 20 #define __ assembler-> |
| 20 | 21 |
| 21 namespace dart { | 22 namespace dart { |
| 22 | 23 |
| 23 DEFINE_FLAG(bool, inline_alloc, true, "Inline allocation of objects."); | 24 DEFINE_FLAG(bool, inline_alloc, true, "Inline allocation of objects."); |
| 24 DEFINE_FLAG(bool, use_slow_path, false, | 25 DEFINE_FLAG(bool, use_slow_path, false, |
| 25 "Set to true for debugging & verifying the slow paths."); | 26 "Set to true for debugging & verifying the slow paths."); |
| 26 DECLARE_FLAG(bool, trace_optimized_ic_calls); | 27 DECLARE_FLAG(bool, trace_optimized_ic_calls); |
| 27 | 28 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 50 // Save exit frame information to enable stack walking as we are about | 51 // Save exit frame information to enable stack walking as we are about |
| 51 // to transition to Dart VM C++ code. | 52 // to transition to Dart VM C++ code. |
| 52 __ StoreToOffset(kWord, SP, R0, Isolate::top_exit_frame_info_offset()); | 53 __ StoreToOffset(kWord, SP, R0, Isolate::top_exit_frame_info_offset()); |
| 53 | 54 |
| 54 // Save current Context pointer into Isolate structure. | 55 // Save current Context pointer into Isolate structure. |
| 55 __ StoreToOffset(kWord, CTX, R0, Isolate::top_context_offset()); | 56 __ StoreToOffset(kWord, CTX, R0, Isolate::top_context_offset()); |
| 56 | 57 |
| 57 // Cache Isolate pointer into CTX while executing runtime code. | 58 // Cache Isolate pointer into CTX while executing runtime code. |
| 58 __ mov(CTX, ShifterOperand(R0)); | 59 __ mov(CTX, ShifterOperand(R0)); |
| 59 | 60 |
| 61 #if defined(DEBUG) |
| 62 { Label ok; |
| 63 // Check that we are always entering from Dart code. |
| 64 __ LoadFromOffset(kWord, R6, CTX, Isolate::vm_tag_offset()); |
| 65 __ CompareImmediate(R6, VMTag::kScriptTagId); |
| 66 __ b(&ok, EQ); |
| 67 __ Stop("Not coming from Dart code."); |
| 68 __ Bind(&ok); |
| 69 } |
| 70 #endif |
| 71 |
| 72 // Mark that the isolate is executing VM code. |
| 73 __ LoadImmediate(R6, VMTag::kVMTagId); |
| 74 __ StoreToOffset(kWord, R6, CTX, Isolate::vm_tag_offset()); |
| 75 |
| 60 // Reserve space for arguments and align frame before entering C++ world. | 76 // Reserve space for arguments and align frame before entering C++ world. |
| 61 // NativeArguments are passed in registers. | 77 // NativeArguments are passed in registers. |
| 62 ASSERT(sizeof(NativeArguments) == 4 * kWordSize); | 78 ASSERT(sizeof(NativeArguments) == 4 * kWordSize); |
| 63 __ ReserveAlignedFrameSpace(0); | 79 __ ReserveAlignedFrameSpace(0); |
| 64 | 80 |
| 65 // Pass NativeArguments structure by value and call runtime. | 81 // Pass NativeArguments structure by value and call runtime. |
| 66 // Registers R0, R1, R2, and R3 are used. | 82 // Registers R0, R1, R2, and R3 are used. |
| 67 | 83 |
| 68 ASSERT(isolate_offset == 0 * kWordSize); | 84 ASSERT(isolate_offset == 0 * kWordSize); |
| 69 // Set isolate in NativeArgs: R0 already contains CTX. | 85 // Set isolate in NativeArgs: R0 already contains CTX. |
| 70 | 86 |
| 71 // There are no runtime calls to closures, so we do not need to set the tag | 87 // There are no runtime calls to closures, so we do not need to set the tag |
| 72 // bits kClosureFunctionBit and kInstanceFunctionBit in argc_tag_. | 88 // bits kClosureFunctionBit and kInstanceFunctionBit in argc_tag_. |
| 73 ASSERT(argc_tag_offset == 1 * kWordSize); | 89 ASSERT(argc_tag_offset == 1 * kWordSize); |
| 74 __ mov(R1, ShifterOperand(R4)); // Set argc in NativeArguments. | 90 __ mov(R1, ShifterOperand(R4)); // Set argc in NativeArguments. |
| 75 | 91 |
| 76 ASSERT(argv_offset == 2 * kWordSize); | 92 ASSERT(argv_offset == 2 * kWordSize); |
| 77 __ add(R2, FP, ShifterOperand(R4, LSL, 2)); // Compute argv. | 93 __ add(R2, FP, ShifterOperand(R4, LSL, 2)); // Compute argv. |
| 78 // Set argv in NativeArguments. | 94 // Set argv in NativeArguments. |
| 79 __ AddImmediate(R2, exitframe_last_param_slot_from_fp * kWordSize); | 95 __ AddImmediate(R2, exitframe_last_param_slot_from_fp * kWordSize); |
| 80 | 96 |
| 81 ASSERT(retval_offset == 3 * kWordSize); | 97 ASSERT(retval_offset == 3 * kWordSize); |
| 82 __ add(R3, R2, ShifterOperand(kWordSize)); // Retval is next to 1st argument. | 98 __ add(R3, R2, ShifterOperand(kWordSize)); // Retval is next to 1st argument. |
| 83 | 99 |
| 84 // Call runtime or redirection via simulator. | 100 // Call runtime or redirection via simulator. |
| 85 __ blx(R5); | 101 __ blx(R5); |
| 86 | 102 |
| 103 // Mark that the isolate is executing Dart code. |
| 104 __ LoadImmediate(R2, VMTag::kScriptTagId); |
| 105 __ StoreToOffset(kWord, R2, CTX, Isolate::vm_tag_offset()); |
| 106 |
| 87 // Reset exit frame information in Isolate structure. | 107 // Reset exit frame information in Isolate structure. |
| 88 __ LoadImmediate(R2, 0); | 108 __ LoadImmediate(R2, 0); |
| 89 __ StoreToOffset(kWord, R2, CTX, Isolate::top_exit_frame_info_offset()); | 109 __ StoreToOffset(kWord, R2, CTX, Isolate::top_exit_frame_info_offset()); |
| 90 | 110 |
| 91 // Load Context pointer from Isolate structure into R2. | 111 // Load Context pointer from Isolate structure into R2. |
| 92 __ LoadFromOffset(kWord, R2, CTX, Isolate::top_context_offset()); | 112 __ LoadFromOffset(kWord, R2, CTX, Isolate::top_context_offset()); |
| 93 | 113 |
| 94 // Reset Context pointer in Isolate structure. | 114 // Reset Context pointer in Isolate structure. |
| 95 __ LoadImmediate(R3, reinterpret_cast<intptr_t>(Object::null())); | 115 __ LoadImmediate(R3, reinterpret_cast<intptr_t>(Object::null())); |
| 96 __ StoreToOffset(kWord, R3, CTX, Isolate::top_context_offset()); | 116 __ StoreToOffset(kWord, R3, CTX, Isolate::top_context_offset()); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // Save exit frame information to enable stack walking as we are about | 166 // Save exit frame information to enable stack walking as we are about |
| 147 // to transition to native code. | 167 // to transition to native code. |
| 148 __ StoreToOffset(kWord, SP, R0, Isolate::top_exit_frame_info_offset()); | 168 __ StoreToOffset(kWord, SP, R0, Isolate::top_exit_frame_info_offset()); |
| 149 | 169 |
| 150 // Save current Context pointer into Isolate structure. | 170 // Save current Context pointer into Isolate structure. |
| 151 __ StoreToOffset(kWord, CTX, R0, Isolate::top_context_offset()); | 171 __ StoreToOffset(kWord, CTX, R0, Isolate::top_context_offset()); |
| 152 | 172 |
| 153 // Cache Isolate pointer into CTX while executing native code. | 173 // Cache Isolate pointer into CTX while executing native code. |
| 154 __ mov(CTX, ShifterOperand(R0)); | 174 __ mov(CTX, ShifterOperand(R0)); |
| 155 | 175 |
| 176 #if defined(DEBUG) |
| 177 { Label ok; |
| 178 // Check that we are always entering from Dart code. |
| 179 __ LoadFromOffset(kWord, R6, CTX, Isolate::vm_tag_offset()); |
| 180 __ CompareImmediate(R6, VMTag::kScriptTagId); |
| 181 __ b(&ok, EQ); |
| 182 __ Stop("Not coming from Dart code."); |
| 183 __ Bind(&ok); |
| 184 } |
| 185 #endif |
| 186 |
| 187 // Mark that the isolate is executing Native code. |
| 188 __ LoadImmediate(R6, VMTag::kRuntimeNativeTagId); |
| 189 __ StoreToOffset(kWord, R6, CTX, Isolate::vm_tag_offset()); |
| 190 |
| 156 // Reserve space for the native arguments structure passed on the stack (the | 191 // Reserve space for the native arguments structure passed on the stack (the |
| 157 // outgoing pointer parameter to the native arguments structure is passed in | 192 // outgoing pointer parameter to the native arguments structure is passed in |
| 158 // R0) and align frame before entering the C++ world. | 193 // R0) and align frame before entering the C++ world. |
| 159 __ ReserveAlignedFrameSpace(sizeof(NativeArguments)); | 194 __ ReserveAlignedFrameSpace(sizeof(NativeArguments)); |
| 160 | 195 |
| 161 // Initialize NativeArguments structure and call native function. | 196 // Initialize NativeArguments structure and call native function. |
| 162 // Registers R0, R1, R2, and R3 are used. | 197 // Registers R0, R1, R2, and R3 are used. |
| 163 | 198 |
| 164 ASSERT(isolate_offset == 0 * kWordSize); | 199 ASSERT(isolate_offset == 0 * kWordSize); |
| 165 // Set isolate in NativeArgs: R0 already contains CTX. | 200 // Set isolate in NativeArgs: R0 already contains CTX. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 __ BranchLink(&NativeEntry::NativeCallWrapperLabel()); | 234 __ BranchLink(&NativeEntry::NativeCallWrapperLabel()); |
| 200 #endif | 235 #endif |
| 201 __ b(&done); | 236 __ b(&done); |
| 202 | 237 |
| 203 __ Bind(&leaf_call); | 238 __ Bind(&leaf_call); |
| 204 // Call native function or redirection via simulator. | 239 // Call native function or redirection via simulator. |
| 205 __ blx(R5); | 240 __ blx(R5); |
| 206 | 241 |
| 207 __ Bind(&done); | 242 __ Bind(&done); |
| 208 | 243 |
| 244 // Mark that the isolate is executing Dart code. |
| 245 __ LoadImmediate(R2, VMTag::kScriptTagId); |
| 246 __ StoreToOffset(kWord, R2, CTX, Isolate::vm_tag_offset()); |
| 247 |
| 209 // Reset exit frame information in Isolate structure. | 248 // Reset exit frame information in Isolate structure. |
| 210 __ LoadImmediate(R2, 0); | 249 __ LoadImmediate(R2, 0); |
| 211 __ StoreToOffset(kWord, R2, CTX, Isolate::top_exit_frame_info_offset()); | 250 __ StoreToOffset(kWord, R2, CTX, Isolate::top_exit_frame_info_offset()); |
| 212 | 251 |
| 213 // Load Context pointer from Isolate structure into R2. | 252 // Load Context pointer from Isolate structure into R2. |
| 214 __ LoadFromOffset(kWord, R2, CTX, Isolate::top_context_offset()); | 253 __ LoadFromOffset(kWord, R2, CTX, Isolate::top_context_offset()); |
| 215 | 254 |
| 216 // Reset Context pointer in Isolate structure. | 255 // Reset Context pointer in Isolate structure. |
| 217 __ LoadImmediate(R3, reinterpret_cast<intptr_t>(Object::null())); | 256 __ LoadImmediate(R3, reinterpret_cast<intptr_t>(Object::null())); |
| 218 __ StoreToOffset(kWord, R3, CTX, Isolate::top_context_offset()); | 257 __ StoreToOffset(kWord, R3, CTX, Isolate::top_context_offset()); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 249 // Save exit frame information to enable stack walking as we are about | 288 // Save exit frame information to enable stack walking as we are about |
| 250 // to transition to native code. | 289 // to transition to native code. |
| 251 __ StoreToOffset(kWord, SP, R0, Isolate::top_exit_frame_info_offset()); | 290 __ StoreToOffset(kWord, SP, R0, Isolate::top_exit_frame_info_offset()); |
| 252 | 291 |
| 253 // Save current Context pointer into Isolate structure. | 292 // Save current Context pointer into Isolate structure. |
| 254 __ StoreToOffset(kWord, CTX, R0, Isolate::top_context_offset()); | 293 __ StoreToOffset(kWord, CTX, R0, Isolate::top_context_offset()); |
| 255 | 294 |
| 256 // Cache Isolate pointer into CTX while executing native code. | 295 // Cache Isolate pointer into CTX while executing native code. |
| 257 __ mov(CTX, ShifterOperand(R0)); | 296 __ mov(CTX, ShifterOperand(R0)); |
| 258 | 297 |
| 298 #if defined(DEBUG) |
| 299 { Label ok; |
| 300 // Check that we are always entering from Dart code. |
| 301 __ LoadFromOffset(kWord, R6, CTX, Isolate::vm_tag_offset()); |
| 302 __ CompareImmediate(R6, VMTag::kScriptTagId); |
| 303 __ b(&ok, EQ); |
| 304 __ Stop("Not coming from Dart code."); |
| 305 __ Bind(&ok); |
| 306 } |
| 307 #endif |
| 308 |
| 309 // Mark that the isolate is executing Native code. |
| 310 __ LoadImmediate(R6, VMTag::kRuntimeNativeTagId); |
| 311 __ StoreToOffset(kWord, R6, CTX, Isolate::vm_tag_offset()); |
| 312 |
| 259 // Reserve space for the native arguments structure passed on the stack (the | 313 // Reserve space for the native arguments structure passed on the stack (the |
| 260 // outgoing pointer parameter to the native arguments structure is passed in | 314 // outgoing pointer parameter to the native arguments structure is passed in |
| 261 // R0) and align frame before entering the C++ world. | 315 // R0) and align frame before entering the C++ world. |
| 262 __ ReserveAlignedFrameSpace(sizeof(NativeArguments)); | 316 __ ReserveAlignedFrameSpace(sizeof(NativeArguments)); |
| 263 | 317 |
| 264 // Initialize NativeArguments structure and call native function. | 318 // Initialize NativeArguments structure and call native function. |
| 265 // Registers R0, R1, R2, and R3 are used. | 319 // Registers R0, R1, R2, and R3 are used. |
| 266 | 320 |
| 267 ASSERT(isolate_offset == 0 * kWordSize); | 321 ASSERT(isolate_offset == 0 * kWordSize); |
| 268 // Set isolate in NativeArgs: R0 already contains CTX. | 322 // Set isolate in NativeArgs: R0 already contains CTX. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 280 | 334 |
| 281 // TODO(regis): Should we pass the structure by value as in runtime calls? | 335 // TODO(regis): Should we pass the structure by value as in runtime calls? |
| 282 // It would require changing Dart API for native functions. | 336 // It would require changing Dart API for native functions. |
| 283 // For now, space is reserved on the stack and we pass a pointer to it. | 337 // For now, space is reserved on the stack and we pass a pointer to it. |
| 284 __ stm(IA, SP, (1 << R0) | (1 << R1) | (1 << R2) | (1 << R3)); | 338 __ stm(IA, SP, (1 << R0) | (1 << R1) | (1 << R2) | (1 << R3)); |
| 285 __ mov(R0, ShifterOperand(SP)); // Pass the pointer to the NativeArguments. | 339 __ mov(R0, ShifterOperand(SP)); // Pass the pointer to the NativeArguments. |
| 286 | 340 |
| 287 // Call native function or redirection via simulator. | 341 // Call native function or redirection via simulator. |
| 288 __ blx(R5); | 342 __ blx(R5); |
| 289 | 343 |
| 344 // Mark that the isolate is executing Dart code. |
| 345 __ LoadImmediate(R2, VMTag::kScriptTagId); |
| 346 __ StoreToOffset(kWord, R2, CTX, Isolate::vm_tag_offset()); |
| 347 |
| 290 // Reset exit frame information in Isolate structure. | 348 // Reset exit frame information in Isolate structure. |
| 291 __ LoadImmediate(R2, 0); | 349 __ LoadImmediate(R2, 0); |
| 292 __ StoreToOffset(kWord, R2, CTX, Isolate::top_exit_frame_info_offset()); | 350 __ StoreToOffset(kWord, R2, CTX, Isolate::top_exit_frame_info_offset()); |
| 293 | 351 |
| 294 // Load Context pointer from Isolate structure into R2. | 352 // Load Context pointer from Isolate structure into R2. |
| 295 __ LoadFromOffset(kWord, R2, CTX, Isolate::top_context_offset()); | 353 __ LoadFromOffset(kWord, R2, CTX, Isolate::top_context_offset()); |
| 296 | 354 |
| 297 // Reset Context pointer in Isolate structure. | 355 // Reset Context pointer in Isolate structure. |
| 298 __ LoadImmediate(R3, reinterpret_cast<intptr_t>(Object::null())); | 356 __ LoadImmediate(R3, reinterpret_cast<intptr_t>(Object::null())); |
| 299 __ StoreToOffset(kWord, R3, CTX, Isolate::top_context_offset()); | 357 __ StoreToOffset(kWord, R3, CTX, Isolate::top_context_offset()); |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 // available in generated code and calls to Isolate::Current() need not be | 887 // available in generated code and calls to Isolate::Current() need not be |
| 830 // done. The assumption is that this register will never be clobbered by | 888 // done. The assumption is that this register will never be clobbered by |
| 831 // compiled or runtime stub code. | 889 // compiled or runtime stub code. |
| 832 | 890 |
| 833 // Cache the new Context pointer into CTX while executing Dart code. | 891 // Cache the new Context pointer into CTX while executing Dart code. |
| 834 __ ldr(CTX, Address(R3, VMHandles::kOffsetOfRawPtrInHandle)); | 892 __ ldr(CTX, Address(R3, VMHandles::kOffsetOfRawPtrInHandle)); |
| 835 | 893 |
| 836 // Load Isolate pointer from Context structure into temporary register R8. | 894 // Load Isolate pointer from Context structure into temporary register R8. |
| 837 __ ldr(R8, FieldAddress(CTX, Context::isolate_offset())); | 895 __ ldr(R8, FieldAddress(CTX, Context::isolate_offset())); |
| 838 | 896 |
| 897 // Save the current VMTag on the stack. |
| 898 ASSERT(kSavedVMTagSlotFromEntryFp == -25); |
| 899 __ LoadFromOffset(kWord, R5, R8, Isolate::vm_tag_offset()); |
| 900 __ Push(R5); |
| 901 |
| 902 // Mark that the isolate is executing Dart code. |
| 903 __ LoadImmediate(R5, VMTag::kScriptTagId); |
| 904 __ StoreToOffset(kWord, R5, R8, Isolate::vm_tag_offset()); |
| 905 |
| 839 // Save the top exit frame info. Use R5 as a temporary register. | 906 // Save the top exit frame info. Use R5 as a temporary register. |
| 840 // StackFrameIterator reads the top exit frame info saved in this frame. | 907 // StackFrameIterator reads the top exit frame info saved in this frame. |
| 841 __ LoadFromOffset(kWord, R5, R8, Isolate::top_exit_frame_info_offset()); | 908 __ LoadFromOffset(kWord, R5, R8, Isolate::top_exit_frame_info_offset()); |
| 842 __ LoadImmediate(R6, 0); | 909 __ LoadImmediate(R6, 0); |
| 843 __ StoreToOffset(kWord, R6, R8, Isolate::top_exit_frame_info_offset()); | 910 __ StoreToOffset(kWord, R6, R8, Isolate::top_exit_frame_info_offset()); |
| 844 | 911 |
| 845 // Save the old Context pointer. Use R4 as a temporary register. | 912 // Save the old Context pointer. Use R4 as a temporary register. |
| 846 // Note that VisitObjectPointers will find this saved Context pointer during | 913 // Note that VisitObjectPointers will find this saved Context pointer during |
| 847 // GC marking, since it traverses any information between SP and | 914 // GC marking, since it traverses any information between SP and |
| 848 // FP - kExitLinkSlotFromEntryFp. | 915 // FP - kExitLinkSlotFromEntryFp. |
| 849 // EntryFrame::SavedContext reads the context saved in this frame. | 916 // EntryFrame::SavedContext reads the context saved in this frame. |
| 850 __ LoadFromOffset(kWord, R4, R8, Isolate::top_context_offset()); | 917 __ LoadFromOffset(kWord, R4, R8, Isolate::top_context_offset()); |
| 851 | 918 |
| 852 // The constants kSavedContextSlotFromEntryFp and | 919 // The constants kSavedContextSlotFromEntryFp and |
| 853 // kExitLinkSlotFromEntryFp must be kept in sync with the code below. | 920 // kExitLinkSlotFromEntryFp must be kept in sync with the code below. |
| 854 ASSERT(kExitLinkSlotFromEntryFp == -25); | 921 ASSERT(kExitLinkSlotFromEntryFp == -26); |
| 855 ASSERT(kSavedContextSlotFromEntryFp == -26); | 922 ASSERT(kSavedContextSlotFromEntryFp == -27); |
| 856 __ PushList((1 << R4) | (1 << R5)); | 923 __ PushList((1 << R4) | (1 << R5)); |
| 857 | 924 |
| 858 // Load arguments descriptor array into R4, which is passed to Dart code. | 925 // Load arguments descriptor array into R4, which is passed to Dart code. |
| 859 __ ldr(R4, Address(R1, VMHandles::kOffsetOfRawPtrInHandle)); | 926 __ ldr(R4, Address(R1, VMHandles::kOffsetOfRawPtrInHandle)); |
| 860 | 927 |
| 861 // Load number of arguments into R5. | 928 // Load number of arguments into R5. |
| 862 __ ldr(R5, FieldAddress(R4, ArgumentsDescriptor::count_offset())); | 929 __ ldr(R5, FieldAddress(R4, ArgumentsDescriptor::count_offset())); |
| 863 __ SmiUntag(R5); | 930 __ SmiUntag(R5); |
| 864 | 931 |
| 865 // Compute address of 'arguments array' data area into R2. | 932 // Compute address of 'arguments array' data area into R2. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 895 __ ldr(CTX, FieldAddress(CTX, Context::isolate_offset())); | 962 __ ldr(CTX, FieldAddress(CTX, Context::isolate_offset())); |
| 896 | 963 |
| 897 // Restore the saved Context pointer into the Isolate structure. | 964 // Restore the saved Context pointer into the Isolate structure. |
| 898 // Uses R4 as a temporary register for this. | 965 // Uses R4 as a temporary register for this. |
| 899 // Restore the saved top exit frame info back into the Isolate structure. | 966 // Restore the saved top exit frame info back into the Isolate structure. |
| 900 // Uses R5 as a temporary register for this. | 967 // Uses R5 as a temporary register for this. |
| 901 __ PopList((1 << R4) | (1 << R5)); | 968 __ PopList((1 << R4) | (1 << R5)); |
| 902 __ StoreToOffset(kWord, R4, CTX, Isolate::top_context_offset()); | 969 __ StoreToOffset(kWord, R4, CTX, Isolate::top_context_offset()); |
| 903 __ StoreToOffset(kWord, R5, CTX, Isolate::top_exit_frame_info_offset()); | 970 __ StoreToOffset(kWord, R5, CTX, Isolate::top_exit_frame_info_offset()); |
| 904 | 971 |
| 972 // Restore the current VMTag from the stack. |
| 973 __ Pop(R4); |
| 974 __ StoreToOffset(kWord, R4, CTX, Isolate::vm_tag_offset()); |
| 975 |
| 905 // Restore C++ ABI callee-saved registers. | 976 // Restore C++ ABI callee-saved registers. |
| 906 // Restore FPU registers. 2 D registers per Q register. | 977 // Restore FPU registers. 2 D registers per Q register. |
| 907 __ vldmd(IA_W, SP, firstd, 2 * kAbiPreservedFpuRegCount); | 978 __ vldmd(IA_W, SP, firstd, 2 * kAbiPreservedFpuRegCount); |
| 908 // Restore CPU registers. | 979 // Restore CPU registers. |
| 909 __ PopList((1 << R3) | kAbiPreservedCpuRegs); // Ignore restored R3. | 980 __ PopList((1 << R3) | kAbiPreservedCpuRegs); // Ignore restored R3. |
| 910 | 981 |
| 911 // Restore the frame pointer and return. | 982 // Restore the frame pointer and return. |
| 912 __ LeaveFrame((1 << FP) | (1 << LR)); | 983 __ LeaveFrame((1 << FP) | (1 << LR)); |
| 913 __ Ret(); | 984 __ Ret(); |
| 914 } | 985 } |
| (...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1942 const Register right = R0; | 2013 const Register right = R0; |
| 1943 __ ldr(left, Address(SP, 1 * kWordSize)); | 2014 __ ldr(left, Address(SP, 1 * kWordSize)); |
| 1944 __ ldr(right, Address(SP, 0 * kWordSize)); | 2015 __ ldr(right, Address(SP, 0 * kWordSize)); |
| 1945 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 2016 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
| 1946 __ Ret(); | 2017 __ Ret(); |
| 1947 } | 2018 } |
| 1948 | 2019 |
| 1949 } // namespace dart | 2020 } // namespace dart |
| 1950 | 2021 |
| 1951 #endif // defined TARGET_ARCH_ARM | 2022 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |