| 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 #ifndef VM_ASSEMBLER_X64_H_ | 5 #ifndef VM_ASSEMBLER_X64_H_ |
| 6 #define VM_ASSEMBLER_X64_H_ | 6 #define VM_ASSEMBLER_X64_H_ |
| 7 | 7 |
| 8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
| 9 #error Do not include assembler_x64.h directly; use assembler.h instead. | 9 #error Do not include assembler_x64.h directly; use assembler.h instead. |
| 10 #endif | 10 #endif |
| (...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 // pushq rbp (size is 1 byte) | 978 // pushq rbp (size is 1 byte) |
| 979 // movq rbp, rsp (size is 3 bytes) | 979 // movq rbp, rsp (size is 3 bytes) |
| 980 // call L (size is 5 bytes) | 980 // call L (size is 5 bytes) |
| 981 // L: | 981 // L: |
| 982 static const intptr_t kEntryPointToPcMarkerOffset = 0; | 982 static const intptr_t kEntryPointToPcMarkerOffset = 0; |
| 983 static intptr_t EntryPointToPcMarkerOffset() { | 983 static intptr_t EntryPointToPcMarkerOffset() { |
| 984 return kEntryPointToPcMarkerOffset; | 984 return kEntryPointToPcMarkerOffset; |
| 985 } | 985 } |
| 986 | 986 |
| 987 void UpdateAllocationStats(intptr_t cid, | 987 void UpdateAllocationStats(intptr_t cid, |
| 988 Heap::Space space); | 988 Heap::Space space, |
| 989 bool inline_isolate = true); |
| 989 | 990 |
| 990 void UpdateAllocationStatsWithSize(intptr_t cid, | 991 void UpdateAllocationStatsWithSize(intptr_t cid, |
| 991 Register size_reg, | 992 Register size_reg, |
| 992 Heap::Space space); | 993 Heap::Space space, |
| 994 bool inline_isolate = true); |
| 993 void UpdateAllocationStatsWithSize(intptr_t cid, | 995 void UpdateAllocationStatsWithSize(intptr_t cid, |
| 994 intptr_t instance_size, | 996 intptr_t instance_size, |
| 995 Heap::Space space); | 997 Heap::Space space, |
| 998 bool inline_isolate = true); |
| 996 | 999 |
| 997 // If allocation tracing for |cid| is enabled, will jump to |trace| label, | 1000 // If allocation tracing for |cid| is enabled, will jump to |trace| label, |
| 998 // which will allocate in the runtime where tracing occurs. | 1001 // which will allocate in the runtime where tracing occurs. |
| 999 void MaybeTraceAllocation(intptr_t cid, | 1002 void MaybeTraceAllocation(intptr_t cid, |
| 1000 Label* trace, | 1003 Label* trace, |
| 1001 bool near_jump); | 1004 bool near_jump); |
| 1002 | 1005 |
| 1003 // Inlined allocation of an instance of class 'cls', code has no runtime | 1006 // Inlined allocation of an instance of class 'cls', code has no runtime |
| 1004 // calls. Jump to 'failure' if the instance cannot be allocated here. | 1007 // calls. Jump to 'failure' if the instance cannot be allocated here. |
| 1005 // Allocated instance is returned in 'instance_reg'. | 1008 // Allocated instance is returned in 'instance_reg'. |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1128 void VerifiedWrite(const Address& dest, | 1131 void VerifiedWrite(const Address& dest, |
| 1129 Register value, | 1132 Register value, |
| 1130 FieldContent old_content); | 1133 FieldContent old_content); |
| 1131 // Unaware of write barrier (use StoreInto* methods for storing to objects). | 1134 // Unaware of write barrier (use StoreInto* methods for storing to objects). |
| 1132 void MoveImmediate(const Address& dst, const Immediate& imm, Register pp); | 1135 void MoveImmediate(const Address& dst, const Immediate& imm, Register pp); |
| 1133 | 1136 |
| 1134 void ComputeCounterAddressesForCid(intptr_t cid, | 1137 void ComputeCounterAddressesForCid(intptr_t cid, |
| 1135 Heap::Space space, | 1138 Heap::Space space, |
| 1136 Address* count_address, | 1139 Address* count_address, |
| 1137 Address* size_address); | 1140 Address* size_address); |
| 1138 void ComputeHeapStatsStateAddressForCid(intptr_t cid, | |
| 1139 Address* state_address); | |
| 1140 DISALLOW_ALLOCATION(); | 1141 DISALLOW_ALLOCATION(); |
| 1141 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1142 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 1142 }; | 1143 }; |
| 1143 | 1144 |
| 1144 | 1145 |
| 1145 inline void Assembler::EmitUint8(uint8_t value) { | 1146 inline void Assembler::EmitUint8(uint8_t value) { |
| 1146 buffer_.Emit<uint8_t>(value); | 1147 buffer_.Emit<uint8_t>(value); |
| 1147 } | 1148 } |
| 1148 | 1149 |
| 1149 | 1150 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1213 } | 1214 } |
| 1214 | 1215 |
| 1215 | 1216 |
| 1216 inline void Assembler::EmitOperandSizeOverride() { | 1217 inline void Assembler::EmitOperandSizeOverride() { |
| 1217 EmitUint8(0x66); | 1218 EmitUint8(0x66); |
| 1218 } | 1219 } |
| 1219 | 1220 |
| 1220 } // namespace dart | 1221 } // namespace dart |
| 1221 | 1222 |
| 1222 #endif // VM_ASSEMBLER_X64_H_ | 1223 #endif // VM_ASSEMBLER_X64_H_ |
| OLD | NEW |