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_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" | 7 #include "src/crankshaft/x87/lithium-codegen-x87.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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 __ bind(&table_entry->label); | 261 __ bind(&table_entry->label); |
262 Address entry = table_entry->address; | 262 Address entry = table_entry->address; |
263 DeoptComment(table_entry->deopt_info); | 263 DeoptComment(table_entry->deopt_info); |
264 if (table_entry->needs_frame) { | 264 if (table_entry->needs_frame) { |
265 DCHECK(!info()->saves_caller_doubles()); | 265 DCHECK(!info()->saves_caller_doubles()); |
266 __ push(Immediate(ExternalReference::ForDeoptEntry(entry))); | 266 __ push(Immediate(ExternalReference::ForDeoptEntry(entry))); |
267 __ call(&needs_frame); | 267 __ call(&needs_frame); |
268 } else { | 268 } else { |
269 __ call(entry, RelocInfo::RUNTIME_ENTRY); | 269 __ call(entry, RelocInfo::RUNTIME_ENTRY); |
270 } | 270 } |
271 info()->LogDeoptCallPosition(masm()->pc_offset(), | 271 LogDeoptCallPosition(masm()->pc_offset(), |
272 table_entry->deopt_info.inlining_id); | 272 table_entry->deopt_info.inlining_id); |
273 } | 273 } |
274 if (needs_frame.is_linked()) { | 274 if (needs_frame.is_linked()) { |
275 __ bind(&needs_frame); | 275 __ bind(&needs_frame); |
276 /* stack layout | 276 /* stack layout |
277 3: entry address | 277 3: entry address |
278 2: return address <-- esp | 278 2: return address <-- esp |
279 1: garbage | 279 1: garbage |
280 0: garbage | 280 0: garbage |
281 */ | 281 */ |
282 __ push(MemOperand(esp, 0)); // Copy return address. | 282 __ push(MemOperand(esp, 0)); // Copy return address. |
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 __ int3(); | 1008 __ int3(); |
1009 __ bind(&done); | 1009 __ bind(&done); |
1010 } | 1010 } |
1011 | 1011 |
1012 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); | 1012 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); |
1013 | 1013 |
1014 DCHECK(info()->IsStub() || frame_is_built_); | 1014 DCHECK(info()->IsStub() || frame_is_built_); |
1015 if (cc == no_condition && frame_is_built_) { | 1015 if (cc == no_condition && frame_is_built_) { |
1016 DeoptComment(deopt_info); | 1016 DeoptComment(deopt_info); |
1017 __ call(entry, RelocInfo::RUNTIME_ENTRY); | 1017 __ call(entry, RelocInfo::RUNTIME_ENTRY); |
1018 info()->LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id); | 1018 LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id); |
1019 } else { | 1019 } else { |
1020 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, | 1020 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, |
1021 !frame_is_built_); | 1021 !frame_is_built_); |
1022 // We often have several deopts to the same entry, reuse the last | 1022 // We often have several deopts to the same entry, reuse the last |
1023 // jump entry if this is the case. | 1023 // jump entry if this is the case. |
1024 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || | 1024 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || |
1025 jump_table_.is_empty() || | 1025 jump_table_.is_empty() || |
1026 !table_entry.IsEquivalentTo(jump_table_.last())) { | 1026 !table_entry.IsEquivalentTo(jump_table_.last())) { |
1027 jump_table_.Add(table_entry, zone()); | 1027 jump_table_.Add(table_entry, zone()); |
1028 } | 1028 } |
(...skipping 4804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5833 __ bind(deferred->exit()); | 5833 __ bind(deferred->exit()); |
5834 __ bind(&done); | 5834 __ bind(&done); |
5835 } | 5835 } |
5836 | 5836 |
5837 #undef __ | 5837 #undef __ |
5838 | 5838 |
5839 } // namespace internal | 5839 } // namespace internal |
5840 } // namespace v8 | 5840 } // namespace v8 |
5841 | 5841 |
5842 #endif // V8_TARGET_ARCH_X87 | 5842 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |