| 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 __ bind(&table_entry->label); | 268 __ bind(&table_entry->label); |
| 269 Address entry = table_entry->address; | 269 Address entry = table_entry->address; |
| 270 DeoptComment(table_entry->deopt_info); | 270 DeoptComment(table_entry->deopt_info); |
| 271 if (table_entry->needs_frame) { | 271 if (table_entry->needs_frame) { |
| 272 DCHECK(!info()->saves_caller_doubles()); | 272 DCHECK(!info()->saves_caller_doubles()); |
| 273 __ push(Immediate(ExternalReference::ForDeoptEntry(entry))); | 273 __ push(Immediate(ExternalReference::ForDeoptEntry(entry))); |
| 274 __ call(&needs_frame); | 274 __ call(&needs_frame); |
| 275 } else { | 275 } else { |
| 276 __ call(entry, RelocInfo::RUNTIME_ENTRY); | 276 __ call(entry, RelocInfo::RUNTIME_ENTRY); |
| 277 } | 277 } |
| 278 LogDeoptCallPosition(masm()->pc_offset(), | |
| 279 table_entry->deopt_info.inlining_id); | |
| 280 } | 278 } |
| 281 if (needs_frame.is_linked()) { | 279 if (needs_frame.is_linked()) { |
| 282 __ bind(&needs_frame); | 280 __ bind(&needs_frame); |
| 283 /* stack layout | 281 /* stack layout |
| 284 3: entry address | 282 3: entry address |
| 285 2: return address <-- esp | 283 2: return address <-- esp |
| 286 1: garbage | 284 1: garbage |
| 287 0: garbage | 285 0: garbage |
| 288 */ | 286 */ |
| 289 __ push(MemOperand(esp, 0)); // Copy return address. | 287 __ push(MemOperand(esp, 0)); // Copy return address. |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 __ int3(); | 1013 __ int3(); |
| 1016 __ bind(&done); | 1014 __ bind(&done); |
| 1017 } | 1015 } |
| 1018 | 1016 |
| 1019 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); | 1017 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); |
| 1020 | 1018 |
| 1021 DCHECK(info()->IsStub() || frame_is_built_); | 1019 DCHECK(info()->IsStub() || frame_is_built_); |
| 1022 if (cc == no_condition && frame_is_built_) { | 1020 if (cc == no_condition && frame_is_built_) { |
| 1023 DeoptComment(deopt_info); | 1021 DeoptComment(deopt_info); |
| 1024 __ call(entry, RelocInfo::RUNTIME_ENTRY); | 1022 __ call(entry, RelocInfo::RUNTIME_ENTRY); |
| 1025 LogDeoptCallPosition(masm()->pc_offset(), deopt_info.inlining_id); | |
| 1026 } else { | 1023 } else { |
| 1027 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, | 1024 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, |
| 1028 !frame_is_built_); | 1025 !frame_is_built_); |
| 1029 // We often have several deopts to the same entry, reuse the last | 1026 // We often have several deopts to the same entry, reuse the last |
| 1030 // jump entry if this is the case. | 1027 // jump entry if this is the case. |
| 1031 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || | 1028 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling() || |
| 1032 jump_table_.is_empty() || | 1029 jump_table_.is_empty() || |
| 1033 !table_entry.IsEquivalentTo(jump_table_.last())) { | 1030 !table_entry.IsEquivalentTo(jump_table_.last())) { |
| 1034 jump_table_.Add(table_entry, zone()); | 1031 jump_table_.Add(table_entry, zone()); |
| 1035 } | 1032 } |
| (...skipping 4852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5888 __ bind(deferred->exit()); | 5885 __ bind(deferred->exit()); |
| 5889 __ bind(&done); | 5886 __ bind(&done); |
| 5890 } | 5887 } |
| 5891 | 5888 |
| 5892 #undef __ | 5889 #undef __ |
| 5893 | 5890 |
| 5894 } // namespace internal | 5891 } // namespace internal |
| 5895 } // namespace v8 | 5892 } // namespace v8 |
| 5896 | 5893 |
| 5897 #endif // V8_TARGET_ARCH_X87 | 5894 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |