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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 } | 363 } |
364 | 364 |
365 | 365 |
366 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { | 366 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { |
367 // The return address is in lr. | 367 // The return address is in lr. |
368 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); | 368 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); |
369 __ TailCallRuntime(Runtime::kGetProperty, 2, 1); | 369 __ TailCallRuntime(Runtime::kGetProperty, 2, 1); |
370 } | 370 } |
371 | 371 |
372 | 372 |
373 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { | |
374 // The return address is in lr. | |
375 Register result = x0; | |
376 Register receiver = LoadDescriptor::ReceiverRegister(); | |
377 Register key = LoadDescriptor::NameRegister(); | |
378 DCHECK(receiver.is(x1)); | |
379 DCHECK(key.is(x2)); | |
380 | |
381 Label miss, unmapped; | |
382 | |
383 Register map_scratch = x0; | |
384 MemOperand mapped_location = GenerateMappedArgumentsLookup( | |
385 masm, receiver, key, map_scratch, x3, x4, &unmapped, &miss); | |
386 __ Ldr(result, mapped_location); | |
387 __ Ret(); | |
388 | |
389 __ Bind(&unmapped); | |
390 // Parameter map is left in map_scratch when a jump on unmapped is done. | |
391 MemOperand unmapped_location = | |
392 GenerateUnmappedArgumentsLookup(masm, key, map_scratch, x3, &miss); | |
393 __ Ldr(result, unmapped_location); | |
394 __ JumpIfRoot(result, Heap::kTheHoleValueRootIndex, &miss); | |
395 __ Ret(); | |
396 | |
397 __ Bind(&miss); | |
398 GenerateMiss(masm); | |
399 } | |
400 | |
401 | |
402 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { | 373 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { |
403 ASM_LOCATION("KeyedStoreIC::GenerateSloppyArguments"); | 374 ASM_LOCATION("KeyedStoreIC::GenerateSloppyArguments"); |
404 Label slow, notin; | 375 Label slow, notin; |
405 Register value = StoreDescriptor::ValueRegister(); | 376 Register value = StoreDescriptor::ValueRegister(); |
406 Register key = StoreDescriptor::NameRegister(); | 377 Register key = StoreDescriptor::NameRegister(); |
407 Register receiver = StoreDescriptor::ReceiverRegister(); | 378 Register receiver = StoreDescriptor::ReceiverRegister(); |
408 DCHECK(receiver.is(x1)); | 379 DCHECK(receiver.is(x1)); |
409 DCHECK(key.is(x2)); | 380 DCHECK(key.is(x2)); |
410 DCHECK(value.is(x0)); | 381 DCHECK(value.is(x0)); |
411 | 382 |
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 } else { | 1030 } else { |
1060 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); | 1031 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); |
1061 // This is JumpIfSmi(smi_reg, branch_imm). | 1032 // This is JumpIfSmi(smi_reg, branch_imm). |
1062 patcher.tbz(smi_reg, 0, branch_imm); | 1033 patcher.tbz(smi_reg, 0, branch_imm); |
1063 } | 1034 } |
1064 } | 1035 } |
1065 } | 1036 } |
1066 } // namespace v8::internal | 1037 } // namespace v8::internal |
1067 | 1038 |
1068 #endif // V8_TARGET_ARCH_ARM64 | 1039 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |