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

Side by Side Diff: src/x87/lithium-codegen-x87.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.cc ('k') | src/x87/macro-assembler-x87.h » ('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_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 5837 matching lines...) Expand 10 before | Expand all | Expand 10 after
5848 new(zone()) DeferredAllocate(this, instr, x87_stack_); 5848 new(zone()) DeferredAllocate(this, instr, x87_stack_);
5849 5849
5850 Register result = ToRegister(instr->result()); 5850 Register result = ToRegister(instr->result());
5851 Register temp = ToRegister(instr->temp()); 5851 Register temp = ToRegister(instr->temp());
5852 5852
5853 // Allocate memory for the object. 5853 // Allocate memory for the object.
5854 AllocationFlags flags = TAG_OBJECT; 5854 AllocationFlags flags = TAG_OBJECT;
5855 if (instr->hydrogen()->MustAllocateDoubleAligned()) { 5855 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
5856 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 5856 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
5857 } 5857 }
5858 if (instr->hydrogen()->IsOldSpaceAllocation()) { 5858 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) {
5859 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
5859 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5860 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5860 flags = static_cast<AllocationFlags>(flags | PRETENURE); 5861 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE);
5862 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5863 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5864 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
5861 } 5865 }
5862 5866
5863 if (instr->size()->IsConstantOperand()) { 5867 if (instr->size()->IsConstantOperand()) {
5864 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5868 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5865 if (size <= Page::kMaxRegularHeapObjectSize) { 5869 if (size <= Page::kMaxRegularHeapObjectSize) {
5866 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5870 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5867 } else { 5871 } else {
5868 __ jmp(deferred->entry()); 5872 __ jmp(deferred->entry());
5869 } 5873 }
5870 } else { 5874 } else {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
5913 __ push(Immediate(Smi::FromInt(size))); 5917 __ push(Immediate(Smi::FromInt(size)));
5914 } else { 5918 } else {
5915 // We should never get here at runtime => abort 5919 // We should never get here at runtime => abort
5916 __ int3(); 5920 __ int3();
5917 return; 5921 return;
5918 } 5922 }
5919 } 5923 }
5920 5924
5921 int flags = AllocateDoubleAlignFlag::encode( 5925 int flags = AllocateDoubleAlignFlag::encode(
5922 instr->hydrogen()->MustAllocateDoubleAligned()); 5926 instr->hydrogen()->MustAllocateDoubleAligned());
5923 if (instr->hydrogen()->IsOldSpaceAllocation()) { 5927 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) {
5928 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
5924 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5929 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5925 flags = AllocateTargetSpace::update(flags, OLD_SPACE); 5930 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE);
5931 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5932 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5933 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE);
5926 } else { 5934 } else {
5927 flags = AllocateTargetSpace::update(flags, NEW_SPACE); 5935 flags = AllocateTargetSpace::update(flags, NEW_SPACE);
5928 } 5936 }
5929 __ push(Immediate(Smi::FromInt(flags))); 5937 __ push(Immediate(Smi::FromInt(flags)));
5930 5938
5931 CallRuntimeFromDeferred( 5939 CallRuntimeFromDeferred(
5932 Runtime::kAllocateInTargetSpace, 2, instr, instr->context()); 5940 Runtime::kAllocateInTargetSpace, 2, instr, instr->context());
5933 __ StoreToSafepointRegisterSlot(result, eax); 5941 __ StoreToSafepointRegisterSlot(result, eax);
5934 } 5942 }
5935 5943
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
6405 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6413 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6406 RecordSafepoint(Safepoint::kNoLazyDeopt); 6414 RecordSafepoint(Safepoint::kNoLazyDeopt);
6407 } 6415 }
6408 6416
6409 6417
6410 #undef __ 6418 #undef __
6411 6419
6412 } } // namespace v8::internal 6420 } } // namespace v8::internal
6413 6421
6414 #endif // V8_TARGET_ARCH_X87 6422 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | src/x87/macro-assembler-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698