OLD | NEW |
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 Loading... |
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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 __ j(NegateCondition(cc), &done, Label::kNear); | 734 __ j(NegateCondition(cc), &done, Label::kNear); |
735 } | 735 } |
736 __ int3(); | 736 __ int3(); |
737 __ bind(&done); | 737 __ bind(&done); |
738 } | 738 } |
739 | 739 |
740 ASSERT(info()->IsStub() || frame_is_built_); | 740 ASSERT(info()->IsStub() || frame_is_built_); |
741 bool needs_lazy_deopt = info()->IsStub(); | 741 bool needs_lazy_deopt = info()->IsStub(); |
742 if (cc == no_condition && frame_is_built_) { | 742 if (cc == no_condition && frame_is_built_) { |
743 if (needs_lazy_deopt) { | 743 if (needs_lazy_deopt) { |
744 __ Call(entry, RelocInfo::RUNTIME_ENTRY); | 744 __ call(entry, RelocInfo::RUNTIME_ENTRY); |
745 } else { | 745 } else { |
746 __ Jump(entry, RelocInfo::RUNTIME_ENTRY); | 746 __ jmp(entry, RelocInfo::RUNTIME_ENTRY); |
747 } | 747 } |
748 } else { | 748 } else { |
749 // We often have several deopts to the same entry, reuse the last | 749 // We often have several deopts to the same entry, reuse the last |
750 // jump entry if this is the case. | 750 // jump entry if this is the case. |
751 if (jump_table_.is_empty() || | 751 if (jump_table_.is_empty() || |
752 jump_table_.last().address != entry || | 752 jump_table_.last().address != entry || |
753 jump_table_.last().needs_frame != !frame_is_built_ || | 753 jump_table_.last().needs_frame != !frame_is_built_ || |
754 jump_table_.last().is_lazy_deopt != needs_lazy_deopt) { | 754 jump_table_.last().is_lazy_deopt != needs_lazy_deopt) { |
755 JumpTableEntry table_entry(entry, !frame_is_built_, needs_lazy_deopt); | 755 JumpTableEntry table_entry(entry, !frame_is_built_, needs_lazy_deopt); |
756 jump_table_.Add(table_entry, zone()); | 756 jump_table_.Add(table_entry, zone()); |
(...skipping 5028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5785 FixedArray::kHeaderSize - kPointerSize)); | 5785 FixedArray::kHeaderSize - kPointerSize)); |
5786 __ bind(&done); | 5786 __ bind(&done); |
5787 } | 5787 } |
5788 | 5788 |
5789 | 5789 |
5790 #undef __ | 5790 #undef __ |
5791 | 5791 |
5792 } } // namespace v8::internal | 5792 } } // namespace v8::internal |
5793 | 5793 |
5794 #endif // V8_TARGET_ARCH_X64 | 5794 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |