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

Unified Diff: src/x64/assembler-x64.cc

Issue 11574027: Use direct jump and call instruction for X64 when the deoptimization entries are in the code range (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: src/x64/assembler-x64.cc
===================================================================
--- src/x64/assembler-x64.cc (revision 13740)
+++ src/x64/assembler-x64.cc (working copy)
@@ -356,6 +356,7 @@
Assembler::Assembler(Isolate* isolate, void* buffer, int buffer_size)
: AssemblerBase(isolate, buffer, buffer_size),
code_targets_(100),
+ runtime_entries_(100),
danno 2013/03/07 14:57:23 Ad previously commented, I don't think you need th
haitao.feng 2013/03/08 05:30:05 Done.
positions_recorder_(this) {
// Clear the buffer in debug mode unless it was provided by the
// caller in which case we can't be sure it's okay to overwrite
@@ -840,6 +841,16 @@
}
+void Assembler::call(Address entry, RelocInfo::Mode rmode) {
+ ASSERT(RelocInfo::IsRuntimeEntry(rmode));
+ positions_recorder()->WriteRecordedPositions();
+ EnsureSpace ensure_space(this);
+ // 1110 1000 #32-bit disp.
+ emit(0xE8);
+ emit_runtime_entry(entry, rmode);
+}
+
+
void Assembler::call(Handle<Code> target,
RelocInfo::Mode rmode,
TypeFeedbackId ast_id) {
@@ -1246,6 +1257,16 @@
}
+void Assembler::j(Condition cc, Address entry, RelocInfo::Mode rmode) {
+ ASSERT(RelocInfo::IsRuntimeEntry(rmode));
+ EnsureSpace ensure_space(this);
+ ASSERT(is_uint4(cc));
+ emit(0x0F);
+ emit(0x80 | cc);
+ emit_runtime_entry(entry, rmode);
+}
+
+
void Assembler::j(Condition cc,
Handle<Code> target,
RelocInfo::Mode rmode) {
@@ -1308,6 +1329,15 @@
}
+void Assembler::jmp(Address entry, RelocInfo::Mode rmode) {
+ ASSERT(RelocInfo::IsRuntimeEntry(rmode));
+ EnsureSpace ensure_space(this);
+ ASSERT(RelocInfo::IsRuntimeEntry(rmode));
+ emit(0xE9);
+ emit_runtime_entry(entry, rmode);
+}
+
+
void Assembler::jmp(Register target) {
EnsureSpace ensure_space(this);
// Opcode FF/4 r64.
@@ -3048,6 +3078,7 @@
const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask |
+ 1 << RelocInfo::RUNTIME_ENTRY |
1 << RelocInfo::INTERNAL_REFERENCE |
1 << RelocInfo::CODE_AGE_SEQUENCE;

Powered by Google App Engine
This is Rietveld 408576698