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" // NOLINT | 5 #include "vm/globals.h" // NOLINT |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
10 #include "vm/heap.h" | 10 #include "vm/heap.h" |
(...skipping 3474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3485 Address state_address(kNoRegister, 0); | 3485 Address state_address(kNoRegister, 0); |
3486 if (cid < kNumPredefinedCids) { | 3486 if (cid < kNumPredefinedCids) { |
3487 ComputeHeapStatsStateAddressForCid(cid, &state_address); | 3487 ComputeHeapStatsStateAddressForCid(cid, &state_address); |
3488 } else { | 3488 } else { |
3489 Register temp_reg = TMP; | 3489 Register temp_reg = TMP; |
3490 const uword class_offset = cid * sizeof(ClassHeapStats); // NOLINT | 3490 const uword class_offset = cid * sizeof(ClassHeapStats); // NOLINT |
3491 const uword state_offset = ClassHeapStats::state_offset(); | 3491 const uword state_offset = ClassHeapStats::state_offset(); |
3492 // temp_reg gets address of class table pointer. | 3492 // temp_reg gets address of class table pointer. |
3493 ClassTable* class_table = Isolate::Current()->class_table(); | 3493 ClassTable* class_table = Isolate::Current()->class_table(); |
3494 movq(temp_reg, Immediate(class_table->ClassStatsTableAddress())); | 3494 movq(temp_reg, Immediate(class_table->ClassStatsTableAddress())); |
| 3495 movq(temp_reg, Address(temp_reg, 0)); |
3495 state_address = Address(temp_reg, class_offset + state_offset); | 3496 state_address = Address(temp_reg, class_offset + state_offset); |
3496 } | 3497 } |
3497 testb(state_address, Immediate(ClassHeapStats::TraceAllocationMask())); | 3498 testb(state_address, Immediate(ClassHeapStats::TraceAllocationMask())); |
3498 // We are tracing for this class, jump to the trace label which will use | 3499 // We are tracing for this class, jump to the trace label which will use |
3499 // the allocation stub. | 3500 // the allocation stub. |
3500 j(NOT_ZERO, trace, near_jump); | 3501 j(NOT_ZERO, trace, near_jump); |
3501 } | 3502 } |
3502 | 3503 |
3503 | 3504 |
3504 void Assembler::UpdateAllocationStats(intptr_t cid, | 3505 void Assembler::UpdateAllocationStats(intptr_t cid, |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3959 | 3960 |
3960 | 3961 |
3961 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3962 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
3962 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 3963 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
3963 return xmm_reg_names[reg]; | 3964 return xmm_reg_names[reg]; |
3964 } | 3965 } |
3965 | 3966 |
3966 } // namespace dart | 3967 } // namespace dart |
3967 | 3968 |
3968 #endif // defined TARGET_ARCH_X64 | 3969 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |