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

Side by Side Diff: src/x64/lithium-codegen-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, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/assembler-x64-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 // building, install a special marker there instead. 346 // building, install a special marker there instead.
347 ASSERT(info()->IsStub()); 347 ASSERT(info()->IsStub());
348 __ Move(rsi, Smi::FromInt(StackFrame::STUB)); 348 __ Move(rsi, Smi::FromInt(StackFrame::STUB));
349 __ push(rsi); 349 __ push(rsi);
350 __ movq(rsi, MemOperand(rsp, kPointerSize)); 350 __ movq(rsi, MemOperand(rsp, kPointerSize));
351 __ jmp(kScratchRegister); 351 __ jmp(kScratchRegister);
352 } 352 }
353 } 353 }
354 } else { 354 } else {
355 if (is_lazy_deopt) { 355 if (is_lazy_deopt) {
356 __ Call(entry, RelocInfo::RUNTIME_ENTRY); 356 __ call(entry, RelocInfo::RUNTIME_ENTRY);
357 } else { 357 } else {
358 __ Jump(entry, RelocInfo::RUNTIME_ENTRY); 358 __ jmp(entry, RelocInfo::RUNTIME_ENTRY);
359 } 359 }
360 } 360 }
361 } 361 }
362 return !is_aborted(); 362 return !is_aborted();
363 } 363 }
364 364
365 365
366 bool LCodeGen::GenerateDeferredCode() { 366 bool LCodeGen::GenerateDeferredCode() {
367 ASSERT(is_generating()); 367 ASSERT(is_generating());
368 if (deferred_.length() > 0) { 368 if (deferred_.length() > 0) {
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 __ j(NegateCondition(cc), &done, Label::kNear); 747 __ j(NegateCondition(cc), &done, Label::kNear);
748 } 748 }
749 __ int3(); 749 __ int3();
750 __ bind(&done); 750 __ bind(&done);
751 } 751 }
752 752
753 ASSERT(info()->IsStub() || frame_is_built_); 753 ASSERT(info()->IsStub() || frame_is_built_);
754 bool needs_lazy_deopt = info()->IsStub(); 754 bool needs_lazy_deopt = info()->IsStub();
755 if (cc == no_condition && frame_is_built_) { 755 if (cc == no_condition && frame_is_built_) {
756 if (needs_lazy_deopt) { 756 if (needs_lazy_deopt) {
757 __ Call(entry, RelocInfo::RUNTIME_ENTRY); 757 __ call(entry, RelocInfo::RUNTIME_ENTRY);
758 } else { 758 } else {
759 __ Jump(entry, RelocInfo::RUNTIME_ENTRY); 759 __ jmp(entry, RelocInfo::RUNTIME_ENTRY);
760 } 760 }
761 } else { 761 } else {
762 // We often have several deopts to the same entry, reuse the last 762 // We often have several deopts to the same entry, reuse the last
763 // jump entry if this is the case. 763 // jump entry if this is the case.
764 if (jump_table_.is_empty() || 764 if (jump_table_.is_empty() ||
765 jump_table_.last().address != entry || 765 jump_table_.last().address != entry ||
766 jump_table_.last().needs_frame != !frame_is_built_ || 766 jump_table_.last().needs_frame != !frame_is_built_ ||
767 jump_table_.last().is_lazy_deopt != needs_lazy_deopt) { 767 jump_table_.last().is_lazy_deopt != needs_lazy_deopt) {
768 JumpTableEntry table_entry(entry, !frame_is_built_, needs_lazy_deopt); 768 JumpTableEntry table_entry(entry, !frame_is_built_, needs_lazy_deopt);
769 jump_table_.Add(table_entry, zone()); 769 jump_table_.Add(table_entry, zone());
(...skipping 5064 matching lines...) Expand 10 before | Expand all | Expand 10 after
5834 FixedArray::kHeaderSize - kPointerSize)); 5834 FixedArray::kHeaderSize - kPointerSize));
5835 __ bind(&done); 5835 __ bind(&done);
5836 } 5836 }
5837 5837
5838 5838
5839 #undef __ 5839 #undef __
5840 5840
5841 } } // namespace v8::internal 5841 } } // namespace v8::internal
5842 5842
5843 #endif // V8_TARGET_ARCH_X64 5843 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698