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_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 4945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4956 incp(source); | 4956 incp(source); |
4957 incp(destination); | 4957 incp(destination); |
4958 decl(length); | 4958 decl(length); |
4959 j(not_zero, &short_loop); | 4959 j(not_zero, &short_loop); |
4960 } | 4960 } |
4961 | 4961 |
4962 bind(&done); | 4962 bind(&done); |
4963 } | 4963 } |
4964 | 4964 |
4965 | 4965 |
4966 void MacroAssembler::InitializeFieldsWithFiller(Register start_offset, | 4966 void MacroAssembler::InitializeFieldsWithFiller(Register current_address, |
4967 Register end_offset, | 4967 Register end_address, |
4968 Register filler) { | 4968 Register filler) { |
4969 Label loop, entry; | 4969 Label loop, entry; |
4970 jmp(&entry); | 4970 jmp(&entry); |
4971 bind(&loop); | 4971 bind(&loop); |
4972 movp(Operand(start_offset, 0), filler); | 4972 movp(Operand(current_address, 0), filler); |
4973 addp(start_offset, Immediate(kPointerSize)); | 4973 addp(current_address, Immediate(kPointerSize)); |
4974 bind(&entry); | 4974 bind(&entry); |
4975 cmpp(start_offset, end_offset); | 4975 cmpp(current_address, end_address); |
4976 j(below, &loop); | 4976 j(below, &loop); |
4977 } | 4977 } |
4978 | 4978 |
4979 | 4979 |
4980 void MacroAssembler::LoadContext(Register dst, int context_chain_length) { | 4980 void MacroAssembler::LoadContext(Register dst, int context_chain_length) { |
4981 if (context_chain_length > 0) { | 4981 if (context_chain_length > 0) { |
4982 // Move up the chain of contexts to the context containing the slot. | 4982 // Move up the chain of contexts to the context containing the slot. |
4983 movp(dst, Operand(rsi, Context::SlotOffset(Context::PREVIOUS_INDEX))); | 4983 movp(dst, Operand(rsi, Context::SlotOffset(Context::PREVIOUS_INDEX))); |
4984 for (int i = 1; i < context_chain_length; i++) { | 4984 for (int i = 1; i < context_chain_length; i++) { |
4985 movp(dst, Operand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX))); | 4985 movp(dst, Operand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX))); |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5513 movl(rax, dividend); | 5513 movl(rax, dividend); |
5514 shrl(rax, Immediate(31)); | 5514 shrl(rax, Immediate(31)); |
5515 addl(rdx, rax); | 5515 addl(rdx, rax); |
5516 } | 5516 } |
5517 | 5517 |
5518 | 5518 |
5519 } // namespace internal | 5519 } // namespace internal |
5520 } // namespace v8 | 5520 } // namespace v8 |
5521 | 5521 |
5522 #endif // V8_TARGET_ARCH_X64 | 5522 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |