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 4368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4379 { | 4379 { |
4380 PushSafepointRegistersScope scope(this); | 4380 PushSafepointRegistersScope scope(this); |
4381 if (instr->object()->IsRegister()) { | 4381 if (instr->object()->IsRegister()) { |
4382 __ Move(result, ToRegister(instr->object())); | 4382 __ Move(result, ToRegister(instr->object())); |
4383 } else { | 4383 } else { |
4384 __ LoadP(result, ToMemOperand(instr->object())); | 4384 __ LoadP(result, ToMemOperand(instr->object())); |
4385 } | 4385 } |
4386 | 4386 |
4387 LOperand* key = instr->key(); | 4387 LOperand* key = instr->key(); |
4388 if (key->IsConstantOperand()) { | 4388 if (key->IsConstantOperand()) { |
4389 __ LoadSmiLiteral(r5, ToSmi(LConstantOperand::cast(key))); | 4389 LConstantOperand* constant_key = LConstantOperand::cast(key); |
| 4390 int32_t int_key = ToInteger32(constant_key); |
| 4391 if (Smi::IsValid(int_key)) { |
| 4392 __ LoadSmiLiteral(r5, Smi::FromInt(int_key)); |
| 4393 } else { |
| 4394 // We should never get here at runtime because there is a smi check on |
| 4395 // the key before this point. |
| 4396 __ stop("expected smi"); |
| 4397 } |
4390 } else { | 4398 } else { |
4391 __ SmiTag(r5, ToRegister(key)); | 4399 __ SmiTag(r5, ToRegister(key)); |
4392 } | 4400 } |
4393 | 4401 |
4394 GrowArrayElementsStub stub(isolate(), instr->hydrogen()->is_js_array(), | 4402 GrowArrayElementsStub stub(isolate(), instr->hydrogen()->is_js_array(), |
4395 instr->hydrogen()->kind()); | 4403 instr->hydrogen()->kind()); |
4396 __ CallStub(&stub); | 4404 __ CallStub(&stub); |
4397 RecordSafepointWithLazyDeopt( | 4405 RecordSafepointWithLazyDeopt( |
4398 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); | 4406 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); |
4399 __ StoreToSafepointRegisterSlot(result, result); | 4407 __ StoreToSafepointRegisterSlot(result, result); |
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5662 __ LoadP(result, | 5670 __ LoadP(result, |
5663 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5671 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5664 __ bind(deferred->exit()); | 5672 __ bind(deferred->exit()); |
5665 __ bind(&done); | 5673 __ bind(&done); |
5666 } | 5674 } |
5667 | 5675 |
5668 #undef __ | 5676 #undef __ |
5669 | 5677 |
5670 } // namespace internal | 5678 } // namespace internal |
5671 } // namespace v8 | 5679 } // namespace v8 |
OLD | NEW |