| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 __ mov(IP, Operand(0)); | 46 __ mov(IP, Operand(0)); |
| 47 __ Push(IP); // Push 0 for the PC marker. | 47 __ Push(IP); // Push 0 for the PC marker. |
| 48 __ EnterFrame((1 << FP) | (1 << LR), 0); | 48 __ EnterFrame((1 << FP) | (1 << LR), 0); |
| 49 | 49 |
| 50 COMPILE_ASSERT((kAbiPreservedCpuRegs & (1 << R9)) != 0); | 50 COMPILE_ASSERT((kAbiPreservedCpuRegs & (1 << R9)) != 0); |
| 51 __ LoadIsolate(R9); | 51 __ LoadIsolate(R9); |
| 52 | 52 |
| 53 // Save exit frame information to enable stack walking as we are about | 53 // Save exit frame information to enable stack walking as we are about |
| 54 // to transition to Dart VM C++ code. | 54 // to transition to Dart VM C++ code. |
| 55 __ StoreToOffset(kWord, SP, R9, Isolate::top_exit_frame_info_offset()); | 55 __ StoreToOffset(kWord, FP, R9, Isolate::top_exit_frame_info_offset()); |
| 56 | 56 |
| 57 #if defined(DEBUG) | 57 #if defined(DEBUG) |
| 58 { Label ok; | 58 { Label ok; |
| 59 // Check that we are always entering from Dart code. | 59 // Check that we are always entering from Dart code. |
| 60 __ LoadFromOffset(kWord, R6, R9, Isolate::vm_tag_offset()); | 60 __ LoadFromOffset(kWord, R6, R9, Isolate::vm_tag_offset()); |
| 61 __ CompareImmediate(R6, VMTag::kDartTagId); | 61 __ CompareImmediate(R6, VMTag::kDartTagId); |
| 62 __ b(&ok, EQ); | 62 __ b(&ok, EQ); |
| 63 __ Stop("Not coming from Dart code."); | 63 __ Stop("Not coming from Dart code."); |
| 64 __ Bind(&ok); | 64 __ Bind(&ok); |
| 65 } | 65 } |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 __ mov(IP, Operand(0)); | 145 __ mov(IP, Operand(0)); |
| 146 __ Push(IP); // Push 0 for the PC marker. | 146 __ Push(IP); // Push 0 for the PC marker. |
| 147 __ EnterFrame((1 << FP) | (1 << LR), 0); | 147 __ EnterFrame((1 << FP) | (1 << LR), 0); |
| 148 | 148 |
| 149 COMPILE_ASSERT((kAbiPreservedCpuRegs & (1 << R9)) != 0); | 149 COMPILE_ASSERT((kAbiPreservedCpuRegs & (1 << R9)) != 0); |
| 150 __ LoadIsolate(R9); | 150 __ LoadIsolate(R9); |
| 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(kWord, SP, R9, Isolate::top_exit_frame_info_offset()); | 154 __ StoreToOffset(kWord, FP, R9, Isolate::top_exit_frame_info_offset()); |
| 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(kWord, R6, R9, Isolate::vm_tag_offset()); | 159 __ LoadFromOffset(kWord, R6, R9, Isolate::vm_tag_offset()); |
| 160 __ CompareImmediate(R6, VMTag::kDartTagId); | 160 __ CompareImmediate(R6, VMTag::kDartTagId); |
| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 237 |
| 238 __ mov(IP, Operand(0)); | 238 __ mov(IP, Operand(0)); |
| 239 __ Push(IP); // Push 0 for the PC marker. | 239 __ Push(IP); // Push 0 for the PC marker. |
| 240 __ EnterFrame((1 << FP) | (1 << LR), 0); | 240 __ EnterFrame((1 << FP) | (1 << LR), 0); |
| 241 | 241 |
| 242 COMPILE_ASSERT((kAbiPreservedCpuRegs & (1 << R9)) != 0); | 242 COMPILE_ASSERT((kAbiPreservedCpuRegs & (1 << R9)) != 0); |
| 243 __ LoadIsolate(R9); | 243 __ LoadIsolate(R9); |
| 244 | 244 |
| 245 // Save exit frame information to enable stack walking as we are about | 245 // Save exit frame information to enable stack walking as we are about |
| 246 // to transition to native code. | 246 // to transition to native code. |
| 247 __ StoreToOffset(kWord, SP, R9, Isolate::top_exit_frame_info_offset()); | 247 __ StoreToOffset(kWord, FP, R9, Isolate::top_exit_frame_info_offset()); |
| 248 | 248 |
| 249 #if defined(DEBUG) | 249 #if defined(DEBUG) |
| 250 { Label ok; | 250 { Label ok; |
| 251 // Check that we are always entering from Dart code. | 251 // Check that we are always entering from Dart code. |
| 252 __ LoadFromOffset(kWord, R6, R9, Isolate::vm_tag_offset()); | 252 __ LoadFromOffset(kWord, R6, R9, Isolate::vm_tag_offset()); |
| 253 __ CompareImmediate(R6, VMTag::kDartTagId); | 253 __ CompareImmediate(R6, VMTag::kDartTagId); |
| 254 __ b(&ok, EQ); | 254 __ b(&ok, EQ); |
| 255 __ Stop("Not coming from Dart code."); | 255 __ Stop("Not coming from Dart code."); |
| 256 __ Bind(&ok); | 256 __ Bind(&ok); |
| 257 } | 257 } |
| (...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2130 // Result: | 2130 // Result: |
| 2131 // R1: entry point. | 2131 // R1: entry point. |
| 2132 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { | 2132 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { |
| 2133 EmitMegamorphicLookup(assembler, R0, R1, R1); | 2133 EmitMegamorphicLookup(assembler, R0, R1, R1); |
| 2134 __ Ret(); | 2134 __ Ret(); |
| 2135 } | 2135 } |
| 2136 | 2136 |
| 2137 } // namespace dart | 2137 } // namespace dart |
| 2138 | 2138 |
| 2139 #endif // defined TARGET_ARCH_ARM | 2139 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |