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 3065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3076 | 3076 |
3077 | 3077 |
3078 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 3078 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
3079 DCHECK(ToRegister(instr->context()).is(cp)); | 3079 DCHECK(ToRegister(instr->context()).is(cp)); |
3080 DCHECK(ToRegister(instr->global_object()) | 3080 DCHECK(ToRegister(instr->global_object()) |
3081 .is(LoadDescriptor::ReceiverRegister())); | 3081 .is(LoadDescriptor::ReceiverRegister())); |
3082 DCHECK(ToRegister(instr->result()).Is(x0)); | 3082 DCHECK(ToRegister(instr->result()).Is(x0)); |
3083 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3083 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
3084 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 3084 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
3085 Handle<Code> ic = | 3085 Handle<Code> ic = |
3086 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode()) | 3086 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode()) |
3087 .code(); | 3087 .code(); |
3088 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3088 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3089 } | 3089 } |
3090 | 3090 |
3091 | 3091 |
3092 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( | 3092 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( |
3093 Register key, | 3093 Register key, |
3094 Register base, | 3094 Register base, |
3095 Register scratch, | 3095 Register scratch, |
3096 bool key_is_smi, | 3096 bool key_is_smi, |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3391 } | 3391 } |
3392 } | 3392 } |
3393 | 3393 |
3394 | 3394 |
3395 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 3395 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
3396 DCHECK(ToRegister(instr->context()).is(cp)); | 3396 DCHECK(ToRegister(instr->context()).is(cp)); |
3397 // LoadIC expects name and receiver in registers. | 3397 // LoadIC expects name and receiver in registers. |
3398 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3398 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
3399 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3399 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
3400 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 3400 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
3401 Handle<Code> ic = | 3401 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate()).code(); |
3402 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_INSIDE_TYPEOF).code(); | |
3403 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3402 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3404 | 3403 |
3405 DCHECK(ToRegister(instr->result()).is(x0)); | 3404 DCHECK(ToRegister(instr->result()).is(x0)); |
3406 } | 3405 } |
3407 | 3406 |
3408 | 3407 |
3409 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { | 3408 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { |
3410 Register result = ToRegister(instr->result()); | 3409 Register result = ToRegister(instr->result()); |
3411 __ LoadRoot(result, instr->index()); | 3410 __ LoadRoot(result, instr->index()); |
3412 } | 3411 } |
(...skipping 2328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5741 // Index is equal to negated out of object property index plus 1. | 5740 // Index is equal to negated out of object property index plus 1. |
5742 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5741 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
5743 __ Ldr(result, FieldMemOperand(result, | 5742 __ Ldr(result, FieldMemOperand(result, |
5744 FixedArray::kHeaderSize - kPointerSize)); | 5743 FixedArray::kHeaderSize - kPointerSize)); |
5745 __ Bind(deferred->exit()); | 5744 __ Bind(deferred->exit()); |
5746 __ Bind(&done); | 5745 __ Bind(&done); |
5747 } | 5746 } |
5748 | 5747 |
5749 } // namespace internal | 5748 } // namespace internal |
5750 } // namespace v8 | 5749 } // namespace v8 |
OLD | NEW |