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 RUNTIME_VM_ASSEMBLER_X64_H_ | 5 #ifndef RUNTIME_VM_ASSEMBLER_X64_H_ |
6 #define RUNTIME_VM_ASSEMBLER_X64_H_ | 6 #define RUNTIME_VM_ASSEMBLER_X64_H_ |
7 | 7 |
8 #ifndef RUNTIME_VM_ASSEMBLER_H_ | 8 #ifndef RUNTIME_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 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 | 875 |
876 const Code::Comments& GetCodeComments() const; | 876 const Code::Comments& GetCodeComments() const; |
877 | 877 |
878 // Address of code at offset. | 878 // Address of code at offset. |
879 uword CodeAddress(intptr_t offset) { | 879 uword CodeAddress(intptr_t offset) { |
880 return buffer_.Address(offset); | 880 return buffer_.Address(offset); |
881 } | 881 } |
882 | 882 |
883 intptr_t CodeSize() const { return buffer_.Size(); } | 883 intptr_t CodeSize() const { return buffer_.Size(); } |
884 intptr_t prologue_offset() const { return prologue_offset_; } | 884 intptr_t prologue_offset() const { return prologue_offset_; } |
| 885 bool has_single_entry_point() const { return has_single_entry_point_; } |
885 | 886 |
886 // Count the fixups that produce a pointer offset, without processing | 887 // Count the fixups that produce a pointer offset, without processing |
887 // the fixups. | 888 // the fixups. |
888 intptr_t CountPointerOffsets() const { | 889 intptr_t CountPointerOffsets() const { |
889 return buffer_.CountPointerOffsets(); | 890 return buffer_.CountPointerOffsets(); |
890 } | 891 } |
891 | 892 |
892 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const { | 893 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const { |
893 return buffer_.pointer_offsets(); | 894 return buffer_.pointer_offsets(); |
894 } | 895 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 // ret PC | 943 // ret PC |
943 // ..... | 944 // ..... |
944 // This code sets this up with the sequence: | 945 // This code sets this up with the sequence: |
945 // pushq rbp | 946 // pushq rbp |
946 // movq rbp, rsp | 947 // movq rbp, rsp |
947 // pushq immediate(0) | 948 // pushq immediate(0) |
948 // ..... | 949 // ..... |
949 void EnterStubFrame(); | 950 void EnterStubFrame(); |
950 void LeaveStubFrame(); | 951 void LeaveStubFrame(); |
951 | 952 |
952 void RawEntry() { buffer_.Reset(); } | |
953 void NoMonomorphicCheckedEntry(); | |
954 void MonomorphicCheckedEntry(); | 953 void MonomorphicCheckedEntry(); |
955 | 954 |
956 void UpdateAllocationStats(intptr_t cid, | 955 void UpdateAllocationStats(intptr_t cid, |
957 Heap::Space space); | 956 Heap::Space space); |
958 | 957 |
959 void UpdateAllocationStatsWithSize(intptr_t cid, | 958 void UpdateAllocationStatsWithSize(intptr_t cid, |
960 Register size_reg, | 959 Register size_reg, |
961 Heap::Space space); | 960 Heap::Space space); |
962 void UpdateAllocationStatsWithSize(intptr_t cid, | 961 void UpdateAllocationStatsWithSize(intptr_t cid, |
963 intptr_t instance_size, | 962 intptr_t instance_size, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1018 // smis. | 1017 // smis. |
1019 static bool IsSafe(const Object& object) { return true; } | 1018 static bool IsSafe(const Object& object) { return true; } |
1020 static bool IsSafeSmi(const Object& object) { return object.IsSmi(); } | 1019 static bool IsSafeSmi(const Object& object) { return object.IsSmi(); } |
1021 | 1020 |
1022 private: | 1021 private: |
1023 AssemblerBuffer buffer_; | 1022 AssemblerBuffer buffer_; |
1024 | 1023 |
1025 ObjectPoolWrapper object_pool_wrapper_; | 1024 ObjectPoolWrapper object_pool_wrapper_; |
1026 | 1025 |
1027 intptr_t prologue_offset_; | 1026 intptr_t prologue_offset_; |
| 1027 bool has_single_entry_point_; |
1028 | 1028 |
1029 class CodeComment : public ZoneAllocated { | 1029 class CodeComment : public ZoneAllocated { |
1030 public: | 1030 public: |
1031 CodeComment(intptr_t pc_offset, const String& comment) | 1031 CodeComment(intptr_t pc_offset, const String& comment) |
1032 : pc_offset_(pc_offset), comment_(comment) { } | 1032 : pc_offset_(pc_offset), comment_(comment) { } |
1033 | 1033 |
1034 intptr_t pc_offset() const { return pc_offset_; } | 1034 intptr_t pc_offset() const { return pc_offset_; } |
1035 const String& comment() const { return comment_; } | 1035 const String& comment() const { return comment_; } |
1036 | 1036 |
1037 private: | 1037 private: |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 } | 1169 } |
1170 | 1170 |
1171 | 1171 |
1172 inline void Assembler::EmitOperandSizeOverride() { | 1172 inline void Assembler::EmitOperandSizeOverride() { |
1173 EmitUint8(0x66); | 1173 EmitUint8(0x66); |
1174 } | 1174 } |
1175 | 1175 |
1176 } // namespace dart | 1176 } // namespace dart |
1177 | 1177 |
1178 #endif // RUNTIME_VM_ASSEMBLER_X64_H_ | 1178 #endif // RUNTIME_VM_ASSEMBLER_X64_H_ |
OLD | NEW |