Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 1023443004: Version 4.3.48.1 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.3.48
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/division-by-constant.h" 10 #include "src/base/division-by-constant.h"
(...skipping 4101 matching lines...) Expand 10 before | Expand all | Expand 10 after
4112 AllocationFlags flags) { 4112 AllocationFlags flags) {
4113 if (kPointerSize == kDoubleSize) { 4113 if (kPointerSize == kDoubleSize) {
4114 if (FLAG_debug_code) { 4114 if (FLAG_debug_code) {
4115 testl(result, Immediate(kDoubleAlignmentMask)); 4115 testl(result, Immediate(kDoubleAlignmentMask));
4116 Check(zero, kAllocationIsNotDoubleAligned); 4116 Check(zero, kAllocationIsNotDoubleAligned);
4117 } 4117 }
4118 } else { 4118 } else {
4119 // Align the next allocation. Storing the filler map without checking top 4119 // Align the next allocation. Storing the filler map without checking top
4120 // is safe in new-space because the limit of the heap is aligned there. 4120 // is safe in new-space because the limit of the heap is aligned there.
4121 DCHECK(kPointerSize * 2 == kDoubleSize); 4121 DCHECK(kPointerSize * 2 == kDoubleSize);
4122 DCHECK((flags & PRETENURE_OLD_POINTER_SPACE) == 0);
4122 DCHECK(kPointerAlignment * 2 == kDoubleAlignment); 4123 DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
4123 // Make sure scratch is not clobbered by this function as it might be 4124 // Make sure scratch is not clobbered by this function as it might be
4124 // used in UpdateAllocationTopHelper later. 4125 // used in UpdateAllocationTopHelper later.
4125 DCHECK(!scratch.is(kScratchRegister)); 4126 DCHECK(!scratch.is(kScratchRegister));
4126 Label aligned; 4127 Label aligned;
4127 testl(result, Immediate(kDoubleAlignmentMask)); 4128 testl(result, Immediate(kDoubleAlignmentMask));
4128 j(zero, &aligned, Label::kNear); 4129 j(zero, &aligned, Label::kNear);
4129 if ((flags & PRETENURE) != 0) { 4130 if ((flags & PRETENURE_OLD_DATA_SPACE) != 0) {
4130 ExternalReference allocation_limit = 4131 ExternalReference allocation_limit =
4131 AllocationUtils::GetAllocationLimitReference(isolate(), flags); 4132 AllocationUtils::GetAllocationLimitReference(isolate(), flags);
4132 cmpp(result, ExternalOperand(allocation_limit)); 4133 cmpp(result, ExternalOperand(allocation_limit));
4133 j(above_equal, gc_required); 4134 j(above_equal, gc_required);
4134 } 4135 }
4135 LoadRoot(kScratchRegister, Heap::kOnePointerFillerMapRootIndex); 4136 LoadRoot(kScratchRegister, Heap::kOnePointerFillerMapRootIndex);
4136 movp(Operand(result, 0), kScratchRegister); 4137 movp(Operand(result, 0), kScratchRegister);
4137 addp(result, Immediate(kDoubleSize / 2)); 4138 addp(result, Immediate(kDoubleSize / 2));
4138 bind(&aligned); 4139 bind(&aligned);
4139 } 4140 }
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
5075 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); 5076 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift));
5076 movl(rax, dividend); 5077 movl(rax, dividend);
5077 shrl(rax, Immediate(31)); 5078 shrl(rax, Immediate(31));
5078 addl(rdx, rax); 5079 addl(rdx, rax);
5079 } 5080 }
5080 5081
5081 5082
5082 } } // namespace v8::internal 5083 } } // namespace v8::internal
5083 5084
5084 #endif // V8_TARGET_ARCH_X64 5085 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698