| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/crankshaft/arm64/lithium-codegen-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
| 6 | 6 |
| 7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
| 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 3310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3321 STATIC_ASSERT(static_cast<unsigned>(kSmiValueSize) == kWRegSizeInBits); | 3321 STATIC_ASSERT(static_cast<unsigned>(kSmiValueSize) == kWRegSizeInBits); |
| 3322 STATIC_ASSERT(kSmiTag == 0); | 3322 STATIC_ASSERT(kSmiTag == 0); |
| 3323 __ Load(result, UntagSmiFieldMemOperand(source, offset), | 3323 __ Load(result, UntagSmiFieldMemOperand(source, offset), |
| 3324 Representation::Integer32()); | 3324 Representation::Integer32()); |
| 3325 } else { | 3325 } else { |
| 3326 __ Load(result, FieldMemOperand(source, offset), access.representation()); | 3326 __ Load(result, FieldMemOperand(source, offset), access.representation()); |
| 3327 } | 3327 } |
| 3328 } | 3328 } |
| 3329 | 3329 |
| 3330 | 3330 |
| 3331 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | |
| 3332 DCHECK(ToRegister(instr->context()).is(cp)); | |
| 3333 // LoadIC expects name and receiver in registers. | |
| 3334 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | |
| 3335 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | |
| 3336 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | |
| 3337 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate()).code(); | |
| 3338 CallCode(ic, RelocInfo::CODE_TARGET, instr); | |
| 3339 | |
| 3340 DCHECK(ToRegister(instr->result()).is(x0)); | |
| 3341 } | |
| 3342 | |
| 3343 | |
| 3344 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { | 3331 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { |
| 3345 Register result = ToRegister(instr->result()); | 3332 Register result = ToRegister(instr->result()); |
| 3346 __ LoadRoot(result, instr->index()); | 3333 __ LoadRoot(result, instr->index()); |
| 3347 } | 3334 } |
| 3348 | 3335 |
| 3349 | 3336 |
| 3350 void LCodeGen::DoMathAbs(LMathAbs* instr) { | 3337 void LCodeGen::DoMathAbs(LMathAbs* instr) { |
| 3351 Representation r = instr->hydrogen()->value()->representation(); | 3338 Representation r = instr->hydrogen()->value()->representation(); |
| 3352 if (r.IsDouble()) { | 3339 if (r.IsDouble()) { |
| 3353 DoubleRegister input = ToDoubleRegister(instr->value()); | 3340 DoubleRegister input = ToDoubleRegister(instr->value()); |
| (...skipping 2293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5647 // Index is equal to negated out of object property index plus 1. | 5634 // Index is equal to negated out of object property index plus 1. |
| 5648 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5635 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5649 __ Ldr(result, FieldMemOperand(result, | 5636 __ Ldr(result, FieldMemOperand(result, |
| 5650 FixedArray::kHeaderSize - kPointerSize)); | 5637 FixedArray::kHeaderSize - kPointerSize)); |
| 5651 __ Bind(deferred->exit()); | 5638 __ Bind(deferred->exit()); |
| 5652 __ Bind(&done); | 5639 __ Bind(&done); |
| 5653 } | 5640 } |
| 5654 | 5641 |
| 5655 } // namespace internal | 5642 } // namespace internal |
| 5656 } // namespace v8 | 5643 } // namespace v8 |
| OLD | NEW |