| 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_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 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 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1329 } | 1329 } |
| 1330 | 1330 |
| 1331 | 1331 |
| 1332 // Loads function into 'temp_reg'. | 1332 // Loads function into 'temp_reg'. |
| 1333 void StubCode::GenerateUsageCounterIncrement(Assembler* assembler, | 1333 void StubCode::GenerateUsageCounterIncrement(Assembler* assembler, |
| 1334 Register temp_reg) { | 1334 Register temp_reg) { |
| 1335 __ TraceSimMsg("UsageCounterIncrement"); | 1335 __ TraceSimMsg("UsageCounterIncrement"); |
| 1336 Register ic_reg = S5; | 1336 Register ic_reg = S5; |
| 1337 Register func_reg = temp_reg; | 1337 Register func_reg = temp_reg; |
| 1338 ASSERT(temp_reg == T0); | 1338 ASSERT(temp_reg == T0); |
| 1339 __ Comment("Increment function counter"); |
| 1339 __ lw(func_reg, FieldAddress(ic_reg, ICData::owner_offset())); | 1340 __ lw(func_reg, FieldAddress(ic_reg, ICData::owner_offset())); |
| 1340 __ lw(T1, FieldAddress(func_reg, Function::usage_counter_offset())); | 1341 __ lw(T1, FieldAddress(func_reg, Function::usage_counter_offset())); |
| 1341 __ addiu(T1, T1, Immediate(1)); | 1342 __ addiu(T1, T1, Immediate(1)); |
| 1342 __ sw(T1, FieldAddress(func_reg, Function::usage_counter_offset())); | 1343 __ sw(T1, FieldAddress(func_reg, Function::usage_counter_offset())); |
| 1343 } | 1344 } |
| 1344 | 1345 |
| 1345 | 1346 |
| 1346 // Note: S5 must be preserved. | 1347 // Note: S5 must be preserved. |
| 1347 // Attempt a quick Smi operation for known operations ('kind'). The ICData | 1348 // Attempt a quick Smi operation for known operations ('kind'). The ICData |
| 1348 // must have been primed with a Smi/Smi check that will be used for counting | 1349 // must have been primed with a Smi/Smi check that will be used for counting |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2247 const Register right = T0; | 2248 const Register right = T0; |
| 2248 __ lw(left, Address(SP, 1 * kWordSize)); | 2249 __ lw(left, Address(SP, 1 * kWordSize)); |
| 2249 __ lw(right, Address(SP, 0 * kWordSize)); | 2250 __ lw(right, Address(SP, 0 * kWordSize)); |
| 2250 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp1, temp2); | 2251 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp1, temp2); |
| 2251 __ Ret(); | 2252 __ Ret(); |
| 2252 } | 2253 } |
| 2253 | 2254 |
| 2254 } // namespace dart | 2255 } // namespace dart |
| 2255 | 2256 |
| 2256 #endif // defined TARGET_ARCH_MIPS | 2257 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |