Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(649)

Side by Side Diff: runtime/vm/assembler_x64.h

Issue 1150633002: Track prologue offset of Code and use for more precise return addresses (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/assembler_ia32.cc ('k') | runtime/vm/assembler_x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 int PreferredLoopAlignment() { return 16; } 878 int PreferredLoopAlignment() { return 16; }
879 void Align(int alignment, intptr_t offset); 879 void Align(int alignment, intptr_t offset);
880 void Bind(Label* label); 880 void Bind(Label* label);
881 void Jump(Label* label) { jmp(label); } 881 void Jump(Label* label) { jmp(label); }
882 882
883 void Comment(const char* format, ...) PRINTF_ATTRIBUTE(2, 3); 883 void Comment(const char* format, ...) PRINTF_ATTRIBUTE(2, 3);
884 static bool EmittingComments(); 884 static bool EmittingComments();
885 885
886 const Code::Comments& GetCodeComments() const; 886 const Code::Comments& GetCodeComments() const;
887 887
888 // Address of code at offset.
889 uword CodeAddress(intptr_t offset) {
890 return buffer_.Address(offset);
891 }
892
888 intptr_t CodeSize() const { return buffer_.Size(); } 893 intptr_t CodeSize() const { return buffer_.Size(); }
889 intptr_t prologue_offset() const { return prologue_offset_; } 894 intptr_t prologue_offset() const { return prologue_offset_; }
890 895
891 // Count the fixups that produce a pointer offset, without processing 896 // Count the fixups that produce a pointer offset, without processing
892 // the fixups. 897 // the fixups.
893 intptr_t CountPointerOffsets() const { 898 intptr_t CountPointerOffsets() const {
894 return buffer_.CountPointerOffsets(); 899 return buffer_.CountPointerOffsets();
895 } 900 }
896 901
897 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const { 902 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const {
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 } 1195 }
1191 1196
1192 1197
1193 inline void Assembler::EmitOperandSizeOverride() { 1198 inline void Assembler::EmitOperandSizeOverride() {
1194 EmitUint8(0x66); 1199 EmitUint8(0x66);
1195 } 1200 }
1196 1201
1197 } // namespace dart 1202 } // namespace dart
1198 1203
1199 #endif // VM_ASSEMBLER_X64_H_ 1204 #endif // VM_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_ia32.cc ('k') | runtime/vm/assembler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698