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 5176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5187 __ bge(&loop); | 5187 __ bge(&loop); |
5188 } | 5188 } |
5189 } | 5189 } |
5190 | 5190 |
5191 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { | 5191 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { |
5192 Register result = ToRegister(instr->result()); | 5192 Register result = ToRegister(instr->result()); |
5193 | 5193 |
5194 // TODO(3095996): Get rid of this. For now, we need to make the | 5194 // TODO(3095996): Get rid of this. For now, we need to make the |
5195 // result register contain a valid pointer because it is already | 5195 // result register contain a valid pointer because it is already |
5196 // contained in the register pointer map. | 5196 // contained in the register pointer map. |
5197 __ LoadSmiLiteral(result, Smi::FromInt(0)); | 5197 __ LoadSmiLiteral(result, Smi::kZero); |
5198 | 5198 |
5199 PushSafepointRegistersScope scope(this); | 5199 PushSafepointRegistersScope scope(this); |
5200 if (instr->size()->IsRegister()) { | 5200 if (instr->size()->IsRegister()) { |
5201 Register size = ToRegister(instr->size()); | 5201 Register size = ToRegister(instr->size()); |
5202 DCHECK(!size.is(result)); | 5202 DCHECK(!size.is(result)); |
5203 __ SmiTag(size); | 5203 __ SmiTag(size); |
5204 __ push(size); | 5204 __ push(size); |
5205 } else { | 5205 } else { |
5206 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5206 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
5207 #if !V8_TARGET_ARCH_S390X | 5207 #if !V8_TARGET_ARCH_S390X |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5505 __ push(r2); | 5505 __ push(r2); |
5506 CallRuntime(Runtime::kForInEnumerate, instr); | 5506 CallRuntime(Runtime::kForInEnumerate, instr); |
5507 __ bind(&use_cache); | 5507 __ bind(&use_cache); |
5508 } | 5508 } |
5509 | 5509 |
5510 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { | 5510 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { |
5511 Register map = ToRegister(instr->map()); | 5511 Register map = ToRegister(instr->map()); |
5512 Register result = ToRegister(instr->result()); | 5512 Register result = ToRegister(instr->result()); |
5513 Label load_cache, done; | 5513 Label load_cache, done; |
5514 __ EnumLength(result, map); | 5514 __ EnumLength(result, map); |
5515 __ CmpSmiLiteral(result, Smi::FromInt(0), r0); | 5515 __ CmpSmiLiteral(result, Smi::kZero, r0); |
5516 __ bne(&load_cache, Label::kNear); | 5516 __ bne(&load_cache, Label::kNear); |
5517 __ mov(result, Operand(isolate()->factory()->empty_fixed_array())); | 5517 __ mov(result, Operand(isolate()->factory()->empty_fixed_array())); |
5518 __ b(&done, Label::kNear); | 5518 __ b(&done, Label::kNear); |
5519 | 5519 |
5520 __ bind(&load_cache); | 5520 __ bind(&load_cache); |
5521 __ LoadInstanceDescriptors(map, result); | 5521 __ LoadInstanceDescriptors(map, result); |
5522 __ LoadP(result, FieldMemOperand(result, DescriptorArray::kEnumCacheOffset)); | 5522 __ LoadP(result, FieldMemOperand(result, DescriptorArray::kEnumCacheOffset)); |
5523 __ LoadP(result, FieldMemOperand(result, FixedArray::SizeFor(instr->idx()))); | 5523 __ LoadP(result, FieldMemOperand(result, FixedArray::SizeFor(instr->idx()))); |
5524 __ CmpP(result, Operand::Zero()); | 5524 __ CmpP(result, Operand::Zero()); |
5525 DeoptimizeIf(eq, instr, DeoptimizeReason::kNoCache); | 5525 DeoptimizeIf(eq, instr, DeoptimizeReason::kNoCache); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5601 __ LoadP(result, | 5601 __ LoadP(result, |
5602 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5602 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5603 __ bind(deferred->exit()); | 5603 __ bind(deferred->exit()); |
5604 __ bind(&done); | 5604 __ bind(&done); |
5605 } | 5605 } |
5606 | 5606 |
5607 #undef __ | 5607 #undef __ |
5608 | 5608 |
5609 } // namespace internal | 5609 } // namespace internal |
5610 } // namespace v8 | 5610 } // namespace v8 |
OLD | NEW |