OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // | 2 // |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 | 5 |
6 #include "src/crankshaft/s390/lithium-codegen-s390.h" | 6 #include "src/crankshaft/s390/lithium-codegen-s390.h" |
7 | 7 |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 5200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5211 } | 5211 } |
5212 | 5212 |
5213 if (instr->hydrogen()->IsAllocationFoldingDominator()) { | 5213 if (instr->hydrogen()->IsAllocationFoldingDominator()) { |
5214 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR); | 5214 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR); |
5215 } | 5215 } |
5216 | 5216 |
5217 DCHECK(!instr->hydrogen()->IsAllocationFolded()); | 5217 DCHECK(!instr->hydrogen()->IsAllocationFolded()); |
5218 | 5218 |
5219 if (instr->size()->IsConstantOperand()) { | 5219 if (instr->size()->IsConstantOperand()) { |
5220 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5220 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
5221 CHECK(size <= Page::kMaxRegularHeapObjectSize); | 5221 CHECK(size <= kMaxRegularHeapObjectSize); |
5222 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); | 5222 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); |
5223 } else { | 5223 } else { |
5224 Register size = ToRegister(instr->size()); | 5224 Register size = ToRegister(instr->size()); |
5225 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); | 5225 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); |
5226 } | 5226 } |
5227 | 5227 |
5228 __ bind(deferred->exit()); | 5228 __ bind(deferred->exit()); |
5229 | 5229 |
5230 if (instr->hydrogen()->MustPrefillWithFiller()) { | 5230 if (instr->hydrogen()->MustPrefillWithFiller()) { |
5231 if (instr->size()->IsConstantOperand()) { | 5231 if (instr->size()->IsConstantOperand()) { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5324 AllocationFlags flags = ALLOCATION_FOLDED; | 5324 AllocationFlags flags = ALLOCATION_FOLDED; |
5325 if (instr->hydrogen()->MustAllocateDoubleAligned()) { | 5325 if (instr->hydrogen()->MustAllocateDoubleAligned()) { |
5326 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); | 5326 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); |
5327 } | 5327 } |
5328 if (instr->hydrogen()->IsOldSpaceAllocation()) { | 5328 if (instr->hydrogen()->IsOldSpaceAllocation()) { |
5329 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 5329 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
5330 flags = static_cast<AllocationFlags>(flags | PRETENURE); | 5330 flags = static_cast<AllocationFlags>(flags | PRETENURE); |
5331 } | 5331 } |
5332 if (instr->size()->IsConstantOperand()) { | 5332 if (instr->size()->IsConstantOperand()) { |
5333 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5333 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
5334 CHECK(size <= Page::kMaxRegularHeapObjectSize); | 5334 CHECK(size <= kMaxRegularHeapObjectSize); |
5335 __ FastAllocate(size, result, scratch1, scratch2, flags); | 5335 __ FastAllocate(size, result, scratch1, scratch2, flags); |
5336 } else { | 5336 } else { |
5337 Register size = ToRegister(instr->size()); | 5337 Register size = ToRegister(instr->size()); |
5338 __ FastAllocate(size, result, scratch1, scratch2, flags); | 5338 __ FastAllocate(size, result, scratch1, scratch2, flags); |
5339 } | 5339 } |
5340 } | 5340 } |
5341 | 5341 |
5342 void LCodeGen::DoTypeof(LTypeof* instr) { | 5342 void LCodeGen::DoTypeof(LTypeof* instr) { |
5343 DCHECK(ToRegister(instr->value()).is(r5)); | 5343 DCHECK(ToRegister(instr->value()).is(r5)); |
5344 DCHECK(ToRegister(instr->result()).is(r2)); | 5344 DCHECK(ToRegister(instr->result()).is(r2)); |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5665 __ LoadP(result, | 5665 __ LoadP(result, |
5666 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5666 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5667 __ bind(deferred->exit()); | 5667 __ bind(deferred->exit()); |
5668 __ bind(&done); | 5668 __ bind(&done); |
5669 } | 5669 } |
5670 | 5670 |
5671 #undef __ | 5671 #undef __ |
5672 | 5672 |
5673 } // namespace internal | 5673 } // namespace internal |
5674 } // namespace v8 | 5674 } // namespace v8 |
OLD | NEW |