| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 __ SetPrologueOffset(); | 45 __ SetPrologueOffset(); |
| 46 __ Comment("CallToRuntimeStub"); | 46 __ Comment("CallToRuntimeStub"); |
| 47 __ EnterFrame(0); | 47 __ EnterFrame(0); |
| 48 | 48 |
| 49 COMPILE_ASSERT((kAbiPreservedCpuRegs & (1 << R28)) != 0); | 49 COMPILE_ASSERT((kAbiPreservedCpuRegs & (1 << R28)) != 0); |
| 50 __ LoadIsolate(R28, kNoPP); | 50 __ LoadIsolate(R28, kNoPP); |
| 51 | 51 |
| 52 // Save exit frame information to enable stack walking as we are about | 52 // Save exit frame information to enable stack walking as we are about |
| 53 // to transition to Dart VM C++ code. | 53 // to transition to Dart VM C++ code. |
| 54 __ StoreToOffset(SP, R28, Isolate::top_exit_frame_info_offset(), kNoPP); | 54 __ StoreToOffset(FP, R28, Isolate::top_exit_frame_info_offset(), kNoPP); |
| 55 | 55 |
| 56 #if defined(DEBUG) | 56 #if defined(DEBUG) |
| 57 { Label ok; | 57 { Label ok; |
| 58 // Check that we are always entering from Dart code. | 58 // Check that we are always entering from Dart code. |
| 59 __ LoadFromOffset(R8, R28, Isolate::vm_tag_offset(), kNoPP); | 59 __ LoadFromOffset(R8, R28, Isolate::vm_tag_offset(), kNoPP); |
| 60 __ CompareImmediate(R8, VMTag::kDartTagId, kNoPP); | 60 __ CompareImmediate(R8, VMTag::kDartTagId, kNoPP); |
| 61 __ b(&ok, EQ); | 61 __ b(&ok, EQ); |
| 62 __ Stop("Not coming from Dart code."); | 62 __ Stop("Not coming from Dart code."); |
| 63 __ Bind(&ok); | 63 __ Bind(&ok); |
| 64 } | 64 } |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 const intptr_t argv_offset = NativeArguments::argv_offset(); | 144 const intptr_t argv_offset = NativeArguments::argv_offset(); |
| 145 const intptr_t retval_offset = NativeArguments::retval_offset(); | 145 const intptr_t retval_offset = NativeArguments::retval_offset(); |
| 146 | 146 |
| 147 __ EnterFrame(0); | 147 __ EnterFrame(0); |
| 148 | 148 |
| 149 COMPILE_ASSERT((kAbiPreservedCpuRegs & (1 << R28)) != 0); | 149 COMPILE_ASSERT((kAbiPreservedCpuRegs & (1 << R28)) != 0); |
| 150 __ LoadIsolate(R28, kNoPP); | 150 __ LoadIsolate(R28, kNoPP); |
| 151 | 151 |
| 152 // Save exit frame information to enable stack walking as we are about | 152 // Save exit frame information to enable stack walking as we are about |
| 153 // to transition to native code. | 153 // to transition to native code. |
| 154 __ StoreToOffset(SP, R28, Isolate::top_exit_frame_info_offset(), kNoPP); | 154 __ StoreToOffset(FP, R28, Isolate::top_exit_frame_info_offset(), kNoPP); |
| 155 | 155 |
| 156 #if defined(DEBUG) | 156 #if defined(DEBUG) |
| 157 { Label ok; | 157 { Label ok; |
| 158 // Check that we are always entering from Dart code. | 158 // Check that we are always entering from Dart code. |
| 159 __ LoadFromOffset(R6, R28, Isolate::vm_tag_offset(), kNoPP); | 159 __ LoadFromOffset(R6, R28, Isolate::vm_tag_offset(), kNoPP); |
| 160 __ CompareImmediate(R6, VMTag::kDartTagId, kNoPP); | 160 __ CompareImmediate(R6, VMTag::kDartTagId, kNoPP); |
| 161 __ b(&ok, EQ); | 161 __ b(&ok, EQ); |
| 162 __ Stop("Not coming from Dart code."); | 162 __ Stop("Not coming from Dart code."); |
| 163 __ Bind(&ok); | 163 __ Bind(&ok); |
| 164 } | 164 } |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 const intptr_t argv_offset = NativeArguments::argv_offset(); | 246 const intptr_t argv_offset = NativeArguments::argv_offset(); |
| 247 const intptr_t retval_offset = NativeArguments::retval_offset(); | 247 const intptr_t retval_offset = NativeArguments::retval_offset(); |
| 248 | 248 |
| 249 __ EnterFrame(0); | 249 __ EnterFrame(0); |
| 250 | 250 |
| 251 COMPILE_ASSERT((kAbiPreservedCpuRegs & (1 << R28)) != 0); | 251 COMPILE_ASSERT((kAbiPreservedCpuRegs & (1 << R28)) != 0); |
| 252 __ LoadIsolate(R28, kNoPP); | 252 __ LoadIsolate(R28, kNoPP); |
| 253 | 253 |
| 254 // Save exit frame information to enable stack walking as we are about | 254 // Save exit frame information to enable stack walking as we are about |
| 255 // to transition to native code. | 255 // to transition to native code. |
| 256 __ StoreToOffset(SP, R28, Isolate::top_exit_frame_info_offset(), kNoPP); | 256 __ StoreToOffset(FP, R28, Isolate::top_exit_frame_info_offset(), kNoPP); |
| 257 | 257 |
| 258 #if defined(DEBUG) | 258 #if defined(DEBUG) |
| 259 { Label ok; | 259 { Label ok; |
| 260 // Check that we are always entering from Dart code. | 260 // Check that we are always entering from Dart code. |
| 261 __ LoadFromOffset(R6, R28, Isolate::vm_tag_offset(), kNoPP); | 261 __ LoadFromOffset(R6, R28, Isolate::vm_tag_offset(), kNoPP); |
| 262 __ CompareImmediate(R6, VMTag::kDartTagId, kNoPP); | 262 __ CompareImmediate(R6, VMTag::kDartTagId, kNoPP); |
| 263 __ b(&ok, EQ); | 263 __ b(&ok, EQ); |
| 264 __ Stop("Not coming from Dart code."); | 264 __ Stop("Not coming from Dart code."); |
| 265 __ Bind(&ok); | 265 __ Bind(&ok); |
| 266 } | 266 } |
| (...skipping 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2180 // Result: | 2180 // Result: |
| 2181 // R1: entry point. | 2181 // R1: entry point. |
| 2182 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { | 2182 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { |
| 2183 EmitMegamorphicLookup(assembler, R0, R1, R1); | 2183 EmitMegamorphicLookup(assembler, R0, R1, R1); |
| 2184 __ ret(); | 2184 __ ret(); |
| 2185 } | 2185 } |
| 2186 | 2186 |
| 2187 } // namespace dart | 2187 } // namespace dart |
| 2188 | 2188 |
| 2189 #endif // defined TARGET_ARCH_ARM64 | 2189 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |