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 5065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5076 } | 5076 } |
5077 | 5077 |
5078 bind(&done); | 5078 bind(&done); |
5079 } | 5079 } |
5080 | 5080 |
5081 | 5081 |
5082 void MacroAssembler::InitializeFieldsWithFiller(Register current_address, | 5082 void MacroAssembler::InitializeFieldsWithFiller(Register current_address, |
5083 Register end_address, | 5083 Register end_address, |
5084 Register filler) { | 5084 Register filler) { |
5085 Label loop, entry; | 5085 Label loop, entry; |
5086 jmp(&entry); | 5086 jmp(&entry, Label::kNear); |
5087 bind(&loop); | 5087 bind(&loop); |
5088 movp(Operand(current_address, 0), filler); | 5088 movp(Operand(current_address, 0), filler); |
5089 addp(current_address, Immediate(kPointerSize)); | 5089 addp(current_address, Immediate(kPointerSize)); |
5090 bind(&entry); | 5090 bind(&entry); |
5091 cmpp(current_address, end_address); | 5091 cmpp(current_address, end_address); |
5092 j(below, &loop); | 5092 j(below, &loop, Label::kNear); |
5093 } | 5093 } |
5094 | 5094 |
5095 | 5095 |
5096 void MacroAssembler::LoadContext(Register dst, int context_chain_length) { | 5096 void MacroAssembler::LoadContext(Register dst, int context_chain_length) { |
5097 if (context_chain_length > 0) { | 5097 if (context_chain_length > 0) { |
5098 // Move up the chain of contexts to the context containing the slot. | 5098 // Move up the chain of contexts to the context containing the slot. |
5099 movp(dst, Operand(rsi, Context::SlotOffset(Context::PREVIOUS_INDEX))); | 5099 movp(dst, Operand(rsi, Context::SlotOffset(Context::PREVIOUS_INDEX))); |
5100 for (int i = 1; i < context_chain_length; i++) { | 5100 for (int i = 1; i < context_chain_length; i++) { |
5101 movp(dst, Operand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX))); | 5101 movp(dst, Operand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX))); |
5102 } | 5102 } |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5510 movl(rax, dividend); | 5510 movl(rax, dividend); |
5511 shrl(rax, Immediate(31)); | 5511 shrl(rax, Immediate(31)); |
5512 addl(rdx, rax); | 5512 addl(rdx, rax); |
5513 } | 5513 } |
5514 | 5514 |
5515 | 5515 |
5516 } // namespace internal | 5516 } // namespace internal |
5517 } // namespace v8 | 5517 } // namespace v8 |
5518 | 5518 |
5519 #endif // V8_TARGET_ARCH_X64 | 5519 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |