OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" | 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 Address entry = table_entry->address; | 267 Address entry = table_entry->address; |
268 DeoptComment(table_entry->deopt_info); | 268 DeoptComment(table_entry->deopt_info); |
269 if (table_entry->needs_frame) { | 269 if (table_entry->needs_frame) { |
270 DCHECK(!info()->saves_caller_doubles()); | 270 DCHECK(!info()->saves_caller_doubles()); |
271 __ push(Immediate(ExternalReference::ForDeoptEntry(entry))); | 271 __ push(Immediate(ExternalReference::ForDeoptEntry(entry))); |
272 __ call(&needs_frame); | 272 __ call(&needs_frame); |
273 } else { | 273 } else { |
274 if (info()->saves_caller_doubles()) RestoreCallerDoubles(); | 274 if (info()->saves_caller_doubles()) RestoreCallerDoubles(); |
275 __ call(entry, RelocInfo::RUNTIME_ENTRY); | 275 __ call(entry, RelocInfo::RUNTIME_ENTRY); |
276 } | 276 } |
277 info()->LogDeoptCallPosition(masm()->pc_offset(), | 277 LogDeoptCallPosition(masm()->pc_offset(), |
278 table_entry->deopt_info.inlining_id); | 278 table_entry->deopt_info.inlining_id); |
279 } | 279 } |
280 if (needs_frame.is_linked()) { | 280 if (needs_frame.is_linked()) { |
281 __ bind(&needs_frame); | 281 __ bind(&needs_frame); |
282 /* stack layout | 282 /* stack layout |
283 3: entry address | 283 3: entry address |
284 2: return address <-- esp | 284 2: return address <-- esp |
285 1: garbage | 285 1: garbage |
286 0: garbage | 286 0: garbage |
287 */ | 287 */ |
288 __ push(MemOperand(esp, 0)); // Copy return address. | 288 __ push(MemOperand(esp, 0)); // Copy return address. |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 __ int3(); | 724 __ int3(); |
725 __ bind(&done); | 725 __ bind(&done); |
726 } | 726 } |
727 | 727 |
728 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); | 728 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); |
729 | 729 |
730 DCHECK(info()->IsStub() || frame_is_built_); | 730 DCHECK(info()->IsStub() || frame_is_built_); |
731 if (cc == no_condition && frame_is_built_) { | 731 if (cc == no_condition && frame_is_built_) { |
732 DeoptComment(deopt_info); | 732 DeoptComment(deopt_info); |
733 __ call(entry, RelocInfo::RUNTIME_ENTRY); | 733 __ call(entry, RelocInfo::RUNTIME_ENTRY); |
734 info()->LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id); | 734 LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id); |
735 } else { | 735 } else { |
736 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, | 736 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, |
737 !frame_is_built_); | 737 !frame_is_built_); |
738 // We often have several deopts to the same entry, reuse the last | 738 // We often have several deopts to the same entry, reuse the last |
739 // jump entry if this is the case. | 739 // jump entry if this is the case. |
740 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || | 740 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || |
741 jump_table_.is_empty() || | 741 jump_table_.is_empty() || |
742 !table_entry.IsEquivalentTo(jump_table_.last())) { | 742 !table_entry.IsEquivalentTo(jump_table_.last())) { |
743 jump_table_.Add(table_entry, zone()); | 743 jump_table_.Add(table_entry, zone()); |
744 } | 744 } |
(...skipping 4543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5288 __ bind(deferred->exit()); | 5288 __ bind(deferred->exit()); |
5289 __ bind(&done); | 5289 __ bind(&done); |
5290 } | 5290 } |
5291 | 5291 |
5292 #undef __ | 5292 #undef __ |
5293 | 5293 |
5294 } // namespace internal | 5294 } // namespace internal |
5295 } // namespace v8 | 5295 } // namespace v8 |
5296 | 5296 |
5297 #endif // V8_TARGET_ARCH_IA32 | 5297 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |