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 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1227 __ str(R7, FieldAddress(func_reg, Function::usage_counter_offset())); | 1227 __ str(R7, FieldAddress(func_reg, Function::usage_counter_offset())); |
1228 } | 1228 } |
1229 | 1229 |
1230 | 1230 |
1231 // Loads function into 'temp_reg'. | 1231 // Loads function into 'temp_reg'. |
1232 void StubCode::GenerateUsageCounterIncrement(Assembler* assembler, | 1232 void StubCode::GenerateUsageCounterIncrement(Assembler* assembler, |
1233 Register temp_reg) { | 1233 Register temp_reg) { |
1234 Register ic_reg = R5; | 1234 Register ic_reg = R5; |
1235 Register func_reg = temp_reg; | 1235 Register func_reg = temp_reg; |
1236 ASSERT(temp_reg == R6); | 1236 ASSERT(temp_reg == R6); |
| 1237 __ Comment("Increment function counter"); |
1237 __ ldr(func_reg, FieldAddress(ic_reg, ICData::owner_offset())); | 1238 __ ldr(func_reg, FieldAddress(ic_reg, ICData::owner_offset())); |
1238 __ ldr(R7, FieldAddress(func_reg, Function::usage_counter_offset())); | 1239 __ ldr(R7, FieldAddress(func_reg, Function::usage_counter_offset())); |
1239 __ add(R7, R7, Operand(1)); | 1240 __ add(R7, R7, Operand(1)); |
1240 __ str(R7, FieldAddress(func_reg, Function::usage_counter_offset())); | 1241 __ str(R7, FieldAddress(func_reg, Function::usage_counter_offset())); |
1241 } | 1242 } |
1242 | 1243 |
1243 | 1244 |
1244 // Note: R5 must be preserved. | 1245 // Note: R5 must be preserved. |
1245 // Attempt a quick Smi operation for known operations ('kind'). The ICData | 1246 // Attempt a quick Smi operation for known operations ('kind'). The ICData |
1246 // must have been primed with a Smi/Smi check that will be used for counting | 1247 // must have been primed with a Smi/Smi check that will be used for counting |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2047 const Register right = R0; | 2048 const Register right = R0; |
2048 __ ldr(left, Address(SP, 1 * kWordSize)); | 2049 __ ldr(left, Address(SP, 1 * kWordSize)); |
2049 __ ldr(right, Address(SP, 0 * kWordSize)); | 2050 __ ldr(right, Address(SP, 0 * kWordSize)); |
2050 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 2051 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
2051 __ Ret(); | 2052 __ Ret(); |
2052 } | 2053 } |
2053 | 2054 |
2054 } // namespace dart | 2055 } // namespace dart |
2055 | 2056 |
2056 #endif // defined TARGET_ARCH_ARM | 2057 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |