| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 #include "src/crankshaft/s390/lithium-codegen-s390.h" | 6 #include "src/crankshaft/s390/lithium-codegen-s390.h" |
| 7 | 7 |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 FrameScope frame_scope(masm_, StackFrame::NONE); | 48 FrameScope frame_scope(masm_, StackFrame::NONE); |
| 49 | 49 |
| 50 return GeneratePrologue() && GenerateBody() && GenerateDeferredCode() && | 50 return GeneratePrologue() && GenerateBody() && GenerateDeferredCode() && |
| 51 GenerateJumpTable() && GenerateSafepointTable(); | 51 GenerateJumpTable() && GenerateSafepointTable(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 void LCodeGen::FinishCode(Handle<Code> code) { | 54 void LCodeGen::FinishCode(Handle<Code> code) { |
| 55 DCHECK(is_done()); | 55 DCHECK(is_done()); |
| 56 code->set_stack_slots(GetTotalFrameSlotCount()); | 56 code->set_stack_slots(GetTotalFrameSlotCount()); |
| 57 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); | 57 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); |
| 58 Handle<ByteArray> source_positions = |
| 59 source_position_table_builder_.ToSourcePositionTable(); |
| 60 code->set_source_position_table(*source_positions); |
| 58 PopulateDeoptimizationData(code); | 61 PopulateDeoptimizationData(code); |
| 59 } | 62 } |
| 60 | 63 |
| 61 void LCodeGen::SaveCallerDoubles() { | 64 void LCodeGen::SaveCallerDoubles() { |
| 62 DCHECK(info()->saves_caller_doubles()); | 65 DCHECK(info()->saves_caller_doubles()); |
| 63 DCHECK(NeedsEagerFrame()); | 66 DCHECK(NeedsEagerFrame()); |
| 64 Comment(";;; Save clobbered callee double registers"); | 67 Comment(";;; Save clobbered callee double registers"); |
| 65 int count = 0; | 68 int count = 0; |
| 66 BitVector* doubles = chunk()->allocated_double_registers(); | 69 BitVector* doubles = chunk()->allocated_double_registers(); |
| 67 BitVector::Iterator save_iterator(doubles); | 70 BitVector::Iterator save_iterator(doubles); |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 LPointerMap empty_pointers(zone()); | 812 LPointerMap empty_pointers(zone()); |
| 810 RecordSafepoint(&empty_pointers, deopt_mode); | 813 RecordSafepoint(&empty_pointers, deopt_mode); |
| 811 } | 814 } |
| 812 | 815 |
| 813 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, | 816 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, |
| 814 int arguments, | 817 int arguments, |
| 815 Safepoint::DeoptMode deopt_mode) { | 818 Safepoint::DeoptMode deopt_mode) { |
| 816 RecordSafepoint(pointers, Safepoint::kWithRegisters, arguments, deopt_mode); | 819 RecordSafepoint(pointers, Safepoint::kWithRegisters, arguments, deopt_mode); |
| 817 } | 820 } |
| 818 | 821 |
| 819 void LCodeGen::RecordAndWritePosition(int position) { | |
| 820 if (position == RelocInfo::kNoPosition) return; | |
| 821 masm()->positions_recorder()->RecordPosition(position); | |
| 822 } | |
| 823 | |
| 824 static const char* LabelType(LLabel* label) { | 822 static const char* LabelType(LLabel* label) { |
| 825 if (label->is_loop_header()) return " (loop header)"; | 823 if (label->is_loop_header()) return " (loop header)"; |
| 826 if (label->is_osr_entry()) return " (OSR entry)"; | 824 if (label->is_osr_entry()) return " (OSR entry)"; |
| 827 return ""; | 825 return ""; |
| 828 } | 826 } |
| 829 | 827 |
| 830 void LCodeGen::DoLabel(LLabel* label) { | 828 void LCodeGen::DoLabel(LLabel* label) { |
| 831 Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------", | 829 Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------", |
| 832 current_instruction_, label->hydrogen_value()->id(), | 830 current_instruction_, label->hydrogen_value()->id(), |
| 833 label->block_id(), LabelType(label)); | 831 label->block_id(), LabelType(label)); |
| (...skipping 4852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5686 __ LoadP(result, | 5684 __ LoadP(result, |
| 5687 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5685 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
| 5688 __ bind(deferred->exit()); | 5686 __ bind(deferred->exit()); |
| 5689 __ bind(&done); | 5687 __ bind(&done); |
| 5690 } | 5688 } |
| 5691 | 5689 |
| 5692 #undef __ | 5690 #undef __ |
| 5693 | 5691 |
| 5694 } // namespace internal | 5692 } // namespace internal |
| 5695 } // namespace v8 | 5693 } // namespace v8 |
| OLD | NEW |