| 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 5054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5065 testl(length, length); | 5065 testl(length, length); |
| 5066 j(zero, &done, Label::kNear); | 5066 j(zero, &done, Label::kNear); |
| 5067 } | 5067 } |
| 5068 | 5068 |
| 5069 bind(&short_loop); | 5069 bind(&short_loop); |
| 5070 movb(scratch, Operand(source, 0)); | 5070 movb(scratch, Operand(source, 0)); |
| 5071 movb(Operand(destination, 0), scratch); | 5071 movb(Operand(destination, 0), scratch); |
| 5072 incp(source); | 5072 incp(source); |
| 5073 incp(destination); | 5073 incp(destination); |
| 5074 decl(length); | 5074 decl(length); |
| 5075 j(not_zero, &short_loop); | 5075 j(not_zero, &short_loop, Label::kNear); |
| 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5511 movl(rax, dividend); | 5511 movl(rax, dividend); |
| 5512 shrl(rax, Immediate(31)); | 5512 shrl(rax, Immediate(31)); |
| 5513 addl(rdx, rax); | 5513 addl(rdx, rax); |
| 5514 } | 5514 } |
| 5515 | 5515 |
| 5516 | 5516 |
| 5517 } // namespace internal | 5517 } // namespace internal |
| 5518 } // namespace v8 | 5518 } // namespace v8 |
| 5519 | 5519 |
| 5520 #endif // V8_TARGET_ARCH_X64 | 5520 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |