OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3775 incq(source); | 3775 incq(source); |
3776 incq(destination); | 3776 incq(destination); |
3777 cmpq(destination, scratch); | 3777 cmpq(destination, scratch); |
3778 j(not_equal, &short_loop); | 3778 j(not_equal, &short_loop); |
3779 | 3779 |
3780 bind(&done); | 3780 bind(&done); |
3781 } | 3781 } |
3782 } | 3782 } |
3783 | 3783 |
3784 | 3784 |
| 3785 void MacroAssembler::InitializeFieldsWithFiller(Register start_offset, |
| 3786 Register end_offset, |
| 3787 Register filler) { |
| 3788 Label loop, entry; |
| 3789 jmp(&entry); |
| 3790 bind(&loop); |
| 3791 movq(Operand(start_offset, 0), filler); |
| 3792 addq(start_offset, Immediate(kPointerSize)); |
| 3793 bind(&entry); |
| 3794 cmpq(start_offset, end_offset); |
| 3795 j(less, &loop); |
| 3796 } |
| 3797 |
| 3798 |
3785 void MacroAssembler::LoadContext(Register dst, int context_chain_length) { | 3799 void MacroAssembler::LoadContext(Register dst, int context_chain_length) { |
3786 if (context_chain_length > 0) { | 3800 if (context_chain_length > 0) { |
3787 // Move up the chain of contexts to the context containing the slot. | 3801 // Move up the chain of contexts to the context containing the slot. |
3788 movq(dst, Operand(rsi, Context::SlotOffset(Context::PREVIOUS_INDEX))); | 3802 movq(dst, Operand(rsi, Context::SlotOffset(Context::PREVIOUS_INDEX))); |
3789 for (int i = 1; i < context_chain_length; i++) { | 3803 for (int i = 1; i < context_chain_length; i++) { |
3790 movq(dst, Operand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX))); | 3804 movq(dst, Operand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX))); |
3791 } | 3805 } |
3792 } else { | 3806 } else { |
3793 // Slot is in the current function context. Move it into the | 3807 // Slot is in the current function context. Move it into the |
3794 // destination register in case we store into it (the write barrier | 3808 // destination register in case we store into it (the write barrier |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3912 CPU::FlushICache(address_, size_); | 3926 CPU::FlushICache(address_, size_); |
3913 | 3927 |
3914 // Check that the code was patched as expected. | 3928 // Check that the code was patched as expected. |
3915 ASSERT(masm_.pc_ == address_ + size_); | 3929 ASSERT(masm_.pc_ == address_ + size_); |
3916 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 3930 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
3917 } | 3931 } |
3918 | 3932 |
3919 } } // namespace v8::internal | 3933 } } // namespace v8::internal |
3920 | 3934 |
3921 #endif // V8_TARGET_ARCH_X64 | 3935 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |