OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 __ mov(entry_offset, Operand(entry - base)); | 319 __ mov(entry_offset, Operand(entry - base)); |
320 | 320 |
321 if (table_entry->needs_frame) { | 321 if (table_entry->needs_frame) { |
322 DCHECK(!info()->saves_caller_doubles()); | 322 DCHECK(!info()->saves_caller_doubles()); |
323 Comment(";;; call deopt with frame"); | 323 Comment(";;; call deopt with frame"); |
324 __ PushCommonFrame(); | 324 __ PushCommonFrame(); |
325 __ b(&needs_frame, SetLK); | 325 __ b(&needs_frame, SetLK); |
326 } else { | 326 } else { |
327 __ b(&call_deopt_entry, SetLK); | 327 __ b(&call_deopt_entry, SetLK); |
328 } | 328 } |
329 info()->LogDeoptCallPosition(masm()->pc_offset(), | 329 LogDeoptCallPosition(masm()->pc_offset(), |
330 table_entry->deopt_info.inlining_id); | 330 table_entry->deopt_info.inlining_id); |
331 } | 331 } |
332 | 332 |
333 if (needs_frame.is_linked()) { | 333 if (needs_frame.is_linked()) { |
334 __ bind(&needs_frame); | 334 __ bind(&needs_frame); |
335 // This variant of deopt can only be used with stubs. Since we don't | 335 // This variant of deopt can only be used with stubs. Since we don't |
336 // have a function pointer to install in the stack frame that we're | 336 // have a function pointer to install in the stack frame that we're |
337 // building, install a special marker there instead. | 337 // building, install a special marker there instead. |
338 __ LoadSmiLiteral(ip, Smi::FromInt(StackFrame::STUB)); | 338 __ LoadSmiLiteral(ip, Smi::FromInt(StackFrame::STUB)); |
339 __ push(ip); | 339 __ push(ip); |
340 DCHECK(info()->IsStub()); | 340 DCHECK(info()->IsStub()); |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 } | 756 } |
757 | 757 |
758 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); | 758 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); |
759 | 759 |
760 DCHECK(info()->IsStub() || frame_is_built_); | 760 DCHECK(info()->IsStub() || frame_is_built_); |
761 // Go through jump table if we need to handle condition, build frame, or | 761 // Go through jump table if we need to handle condition, build frame, or |
762 // restore caller doubles. | 762 // restore caller doubles. |
763 if (cond == al && frame_is_built_ && !info()->saves_caller_doubles()) { | 763 if (cond == al && frame_is_built_ && !info()->saves_caller_doubles()) { |
764 DeoptComment(deopt_info); | 764 DeoptComment(deopt_info); |
765 __ Call(entry, RelocInfo::RUNTIME_ENTRY); | 765 __ Call(entry, RelocInfo::RUNTIME_ENTRY); |
766 info()->LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id); | 766 LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id); |
767 } else { | 767 } else { |
768 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, | 768 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, |
769 !frame_is_built_); | 769 !frame_is_built_); |
770 // We often have several deopts to the same entry, reuse the last | 770 // We often have several deopts to the same entry, reuse the last |
771 // jump entry if this is the case. | 771 // jump entry if this is the case. |
772 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || | 772 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || |
773 jump_table_.is_empty() || | 773 jump_table_.is_empty() || |
774 !table_entry.IsEquivalentTo(jump_table_.last())) { | 774 !table_entry.IsEquivalentTo(jump_table_.last())) { |
775 jump_table_.Add(table_entry, zone()); | 775 jump_table_.Add(table_entry, zone()); |
776 } | 776 } |
(...skipping 5009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5786 __ LoadP(result, | 5786 __ LoadP(result, |
5787 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5787 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5788 __ bind(deferred->exit()); | 5788 __ bind(deferred->exit()); |
5789 __ bind(&done); | 5789 __ bind(&done); |
5790 } | 5790 } |
5791 | 5791 |
5792 #undef __ | 5792 #undef __ |
5793 | 5793 |
5794 } // namespace internal | 5794 } // namespace internal |
5795 } // namespace v8 | 5795 } // namespace v8 |
OLD | NEW |