| 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 2088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2099 | 2099 |
| 2100 | 2100 |
| 2101 void StubCode::EmitMegamorphicLookup(Assembler* assembler) { | 2101 void StubCode::EmitMegamorphicLookup(Assembler* assembler) { |
| 2102 __ LoadTaggedClassIdMayBeSmi(R0, R0); | 2102 __ LoadTaggedClassIdMayBeSmi(R0, R0); |
| 2103 // R0: class ID of the receiver (smi). | 2103 // R0: class ID of the receiver (smi). |
| 2104 __ ldr(R4, FieldAddress(R5, MegamorphicCache::arguments_descriptor_offset())); | 2104 __ ldr(R4, FieldAddress(R5, MegamorphicCache::arguments_descriptor_offset())); |
| 2105 __ ldr(R2, FieldAddress(R5, MegamorphicCache::buckets_offset())); | 2105 __ ldr(R2, FieldAddress(R5, MegamorphicCache::buckets_offset())); |
| 2106 __ ldr(R1, FieldAddress(R5, MegamorphicCache::mask_offset())); | 2106 __ ldr(R1, FieldAddress(R5, MegamorphicCache::mask_offset())); |
| 2107 // R2: cache buckets array. | 2107 // R2: cache buckets array. |
| 2108 // R1: mask. | 2108 // R1: mask. |
| 2109 __ mov(R3, R0); | 2109 __ LoadImmediate(TMP, MegamorphicCache::kSpreadFactor); |
| 2110 __ mul(R3, R0, TMP); |
| 2110 // R3: probe. | 2111 // R3: probe. |
| 2111 | 2112 |
| 2112 Label loop, update, load_target_function; | 2113 Label loop, update, load_target_function; |
| 2113 __ b(&loop); | 2114 __ b(&loop); |
| 2114 | 2115 |
| 2115 __ Bind(&update); | 2116 __ Bind(&update); |
| 2116 __ add(R3, R3, Operand(Smi::RawValue(1))); | 2117 __ add(R3, R3, Operand(Smi::RawValue(1))); |
| 2117 __ Bind(&loop); | 2118 __ Bind(&loop); |
| 2118 __ and_(R3, R3, Operand(R1)); | 2119 __ and_(R3, R3, Operand(R1)); |
| 2119 const intptr_t base = Array::data_offset(); | 2120 const intptr_t base = Array::data_offset(); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2229 } | 2230 } |
| 2230 | 2231 |
| 2231 | 2232 |
| 2232 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { | 2233 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { |
| 2233 __ brk(0); | 2234 __ brk(0); |
| 2234 } | 2235 } |
| 2235 | 2236 |
| 2236 } // namespace dart | 2237 } // namespace dart |
| 2237 | 2238 |
| 2238 #endif // defined TARGET_ARCH_ARM64 | 2239 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |