Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: src/ic/arm64/ic-arm64.cc

Issue 486213003: Move register conventions out of the IC classes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/arm64/ic-compiler-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 326
327 __ Add(backing_store, backing_store, 327 __ Add(backing_store, backing_store,
328 FixedArray::kHeaderSize - kHeapObjectTag); 328 FixedArray::kHeaderSize - kHeapObjectTag);
329 __ SmiUntag(scratch, key); 329 __ SmiUntag(scratch, key);
330 return MemOperand(backing_store, scratch, LSL, kPointerSizeLog2); 330 return MemOperand(backing_store, scratch, LSL, kPointerSizeLog2);
331 } 331 }
332 332
333 333
334 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { 334 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
335 // The return address is in lr. 335 // The return address is in lr.
336 Register receiver = ReceiverRegister(); 336 Register receiver = LoadConvention::ReceiverRegister();
337 Register name = NameRegister(); 337 Register name = LoadConvention::NameRegister();
338 DCHECK(receiver.is(x1)); 338 DCHECK(receiver.is(x1));
339 DCHECK(name.is(x2)); 339 DCHECK(name.is(x2));
340 340
341 // Probe the stub cache. 341 // Probe the stub cache.
342 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 342 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
343 Code::ComputeHandlerFlags(Code::LOAD_IC)); 343 Code::ComputeHandlerFlags(Code::LOAD_IC));
344 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, x3, 344 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, x3,
345 x4, x5, x6); 345 x4, x5, x6);
346 346
347 // Cache miss: Jump to runtime. 347 // Cache miss: Jump to runtime.
348 GenerateMiss(masm); 348 GenerateMiss(masm);
349 } 349 }
350 350
351 351
352 void LoadIC::GenerateNormal(MacroAssembler* masm) { 352 void LoadIC::GenerateNormal(MacroAssembler* masm) {
353 Register dictionary = x0; 353 Register dictionary = x0;
354 DCHECK(!dictionary.is(ReceiverRegister())); 354 DCHECK(!dictionary.is(LoadConvention::ReceiverRegister()));
355 DCHECK(!dictionary.is(NameRegister())); 355 DCHECK(!dictionary.is(LoadConvention::NameRegister()));
356 Label slow; 356 Label slow;
357 357
358 __ Ldr(dictionary, 358 __ Ldr(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(),
359 FieldMemOperand(ReceiverRegister(), JSObject::kPropertiesOffset)); 359 JSObject::kPropertiesOffset));
360 GenerateDictionaryLoad(masm, &slow, dictionary, NameRegister(), x0, x3, x4); 360 GenerateDictionaryLoad(masm, &slow, dictionary,
361 LoadConvention::NameRegister(), x0, x3, x4);
361 __ Ret(); 362 __ Ret();
362 363
363 // Dictionary load failed, go slow (but don't miss). 364 // Dictionary load failed, go slow (but don't miss).
364 __ Bind(&slow); 365 __ Bind(&slow);
365 GenerateRuntimeGetProperty(masm); 366 GenerateRuntimeGetProperty(masm);
366 } 367 }
367 368
368 369
369 void LoadIC::GenerateMiss(MacroAssembler* masm) { 370 void LoadIC::GenerateMiss(MacroAssembler* masm) {
370 // The return address is in lr. 371 // The return address is in lr.
371 Isolate* isolate = masm->isolate(); 372 Isolate* isolate = masm->isolate();
372 ASM_LOCATION("LoadIC::GenerateMiss"); 373 ASM_LOCATION("LoadIC::GenerateMiss");
373 374
374 __ IncrementCounter(isolate->counters()->load_miss(), 1, x3, x4); 375 __ IncrementCounter(isolate->counters()->load_miss(), 1, x3, x4);
375 376
376 // Perform tail call to the entry. 377 // Perform tail call to the entry.
377 __ Push(ReceiverRegister(), NameRegister()); 378 __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
378 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); 379 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
379 __ TailCallExternalReference(ref, 2, 1); 380 __ TailCallExternalReference(ref, 2, 1);
380 } 381 }
381 382
382 383
383 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 384 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
384 // The return address is in lr. 385 // The return address is in lr.
385 __ Push(ReceiverRegister(), NameRegister()); 386 __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
386 __ TailCallRuntime(Runtime::kGetProperty, 2, 1); 387 __ TailCallRuntime(Runtime::kGetProperty, 2, 1);
387 } 388 }
388 389
389 390
390 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { 391 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
391 // The return address is in lr. 392 // The return address is in lr.
392 Register result = x0; 393 Register result = x0;
393 Register receiver = ReceiverRegister(); 394 Register receiver = LoadConvention::ReceiverRegister();
394 Register key = NameRegister(); 395 Register key = LoadConvention::NameRegister();
395 DCHECK(receiver.is(x1)); 396 DCHECK(receiver.is(x1));
396 DCHECK(key.is(x2)); 397 DCHECK(key.is(x2));
397 398
398 Label miss, unmapped; 399 Label miss, unmapped;
399 400
400 Register map_scratch = x0; 401 Register map_scratch = x0;
401 MemOperand mapped_location = GenerateMappedArgumentsLookup( 402 MemOperand mapped_location = GenerateMappedArgumentsLookup(
402 masm, receiver, key, map_scratch, x3, x4, &unmapped, &miss); 403 masm, receiver, key, map_scratch, x3, x4, &unmapped, &miss);
403 __ Ldr(result, mapped_location); 404 __ Ldr(result, mapped_location);
404 __ Ret(); 405 __ Ret();
405 406
406 __ Bind(&unmapped); 407 __ Bind(&unmapped);
407 // Parameter map is left in map_scratch when a jump on unmapped is done. 408 // Parameter map is left in map_scratch when a jump on unmapped is done.
408 MemOperand unmapped_location = 409 MemOperand unmapped_location =
409 GenerateUnmappedArgumentsLookup(masm, key, map_scratch, x3, &miss); 410 GenerateUnmappedArgumentsLookup(masm, key, map_scratch, x3, &miss);
410 __ Ldr(result, unmapped_location); 411 __ Ldr(result, unmapped_location);
411 __ JumpIfRoot(result, Heap::kTheHoleValueRootIndex, &miss); 412 __ JumpIfRoot(result, Heap::kTheHoleValueRootIndex, &miss);
412 __ Ret(); 413 __ Ret();
413 414
414 __ Bind(&miss); 415 __ Bind(&miss);
415 GenerateMiss(masm); 416 GenerateMiss(masm);
416 } 417 }
417 418
418 419
419 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { 420 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
420 ASM_LOCATION("KeyedStoreIC::GenerateSloppyArguments"); 421 ASM_LOCATION("KeyedStoreIC::GenerateSloppyArguments");
421 Label slow, notin; 422 Label slow, notin;
422 Register value = ValueRegister(); 423 Register value = StoreConvention::ValueRegister();
423 Register key = NameRegister(); 424 Register key = StoreConvention::NameRegister();
424 Register receiver = ReceiverRegister(); 425 Register receiver = StoreConvention::ReceiverRegister();
425 DCHECK(receiver.is(x1)); 426 DCHECK(receiver.is(x1));
426 DCHECK(key.is(x2)); 427 DCHECK(key.is(x2));
427 DCHECK(value.is(x0)); 428 DCHECK(value.is(x0));
428 429
429 Register map = x3; 430 Register map = x3;
430 431
431 // These registers are used by GenerateMappedArgumentsLookup to build a 432 // These registers are used by GenerateMappedArgumentsLookup to build a
432 // MemOperand. They are live for as long as the MemOperand is live. 433 // MemOperand. They are live for as long as the MemOperand is live.
433 Register mapped1 = x4; 434 Register mapped1 = x4;
434 Register mapped2 = x5; 435 Register mapped2 = x5;
(...skipping 26 matching lines...) Expand all
461 GenerateMiss(masm); 462 GenerateMiss(masm);
462 } 463 }
463 464
464 465
465 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { 466 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
466 // The return address is in lr. 467 // The return address is in lr.
467 Isolate* isolate = masm->isolate(); 468 Isolate* isolate = masm->isolate();
468 469
469 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, x10, x11); 470 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, x10, x11);
470 471
471 __ Push(ReceiverRegister(), NameRegister()); 472 __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
472 473
473 // Perform tail call to the entry. 474 // Perform tail call to the entry.
474 ExternalReference ref = 475 ExternalReference ref =
475 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); 476 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate);
476 477
477 __ TailCallExternalReference(ref, 2, 1); 478 __ TailCallExternalReference(ref, 2, 1);
478 } 479 }
479 480
480 481
481 // IC register specifications
482 const Register LoadIC::ReceiverRegister() { return x1; }
483 const Register LoadIC::NameRegister() { return x2; }
484
485 const Register LoadIC::SlotRegister() {
486 DCHECK(FLAG_vector_ics);
487 return x0;
488 }
489
490
491 const Register LoadIC::VectorRegister() {
492 DCHECK(FLAG_vector_ics);
493 return x3;
494 }
495
496
497 const Register StoreIC::ReceiverRegister() { return x1; }
498 const Register StoreIC::NameRegister() { return x2; }
499 const Register StoreIC::ValueRegister() { return x0; }
500
501
502 const Register KeyedStoreIC::MapRegister() { return x3; }
503
504
505 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 482 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
506 // The return address is in lr. 483 // The return address is in lr.
507 __ Push(ReceiverRegister(), NameRegister()); 484 __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
508 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); 485 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
509 } 486 }
510 487
511 488
512 static void GenerateKeyedLoadWithSmiKey(MacroAssembler* masm, Register key, 489 static void GenerateKeyedLoadWithSmiKey(MacroAssembler* masm, Register key,
513 Register receiver, Register scratch1, 490 Register receiver, Register scratch1,
514 Register scratch2, Register scratch3, 491 Register scratch2, Register scratch3,
515 Register scratch4, Register scratch5, 492 Register scratch4, Register scratch5,
516 Label* slow) { 493 Label* slow) {
517 DCHECK(!AreAliased(key, receiver, scratch1, scratch2, scratch3, scratch4, 494 DCHECK(!AreAliased(key, receiver, scratch1, scratch2, scratch3, scratch4,
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 __ IncrementCounter(isolate->counters()->keyed_load_generic_symbol(), 1, 638 __ IncrementCounter(isolate->counters()->keyed_load_generic_symbol(), 1,
662 scratch1, scratch2); 639 scratch1, scratch2);
663 __ Ret(); 640 __ Ret();
664 } 641 }
665 642
666 643
667 void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) { 644 void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
668 // The return address is in lr. 645 // The return address is in lr.
669 Label slow, check_name, index_smi, index_name; 646 Label slow, check_name, index_smi, index_name;
670 647
671 Register key = NameRegister(); 648 Register key = LoadConvention::NameRegister();
672 Register receiver = ReceiverRegister(); 649 Register receiver = LoadConvention::ReceiverRegister();
673 DCHECK(key.is(x2)); 650 DCHECK(key.is(x2));
674 DCHECK(receiver.is(x1)); 651 DCHECK(receiver.is(x1));
675 652
676 __ JumpIfNotSmi(key, &check_name); 653 __ JumpIfNotSmi(key, &check_name);
677 __ Bind(&index_smi); 654 __ Bind(&index_smi);
678 // Now the key is known to be a smi. This place is also jumped to from below 655 // Now the key is known to be a smi. This place is also jumped to from below
679 // where a numeric string is converted to a smi. 656 // where a numeric string is converted to a smi.
680 GenerateKeyedLoadWithSmiKey(masm, key, receiver, x7, x3, x4, x5, x6, &slow); 657 GenerateKeyedLoadWithSmiKey(masm, key, receiver, x7, x3, x4, x5, x6, &slow);
681 658
682 // Slow case. 659 // Slow case.
(...skipping 11 matching lines...) Expand all
694 __ IndexFromHash(x3, key); 671 __ IndexFromHash(x3, key);
695 // Now jump to the place where smi keys are handled. 672 // Now jump to the place where smi keys are handled.
696 __ B(&index_smi); 673 __ B(&index_smi);
697 } 674 }
698 675
699 676
700 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { 677 void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
701 // Return address is in lr. 678 // Return address is in lr.
702 Label miss; 679 Label miss;
703 680
704 Register receiver = ReceiverRegister(); 681 Register receiver = LoadConvention::ReceiverRegister();
705 Register index = NameRegister(); 682 Register index = LoadConvention::NameRegister();
706 Register result = x0; 683 Register result = x0;
707 Register scratch = x3; 684 Register scratch = x3;
708 DCHECK(!scratch.is(receiver) && !scratch.is(index)); 685 DCHECK(!scratch.is(receiver) && !scratch.is(index));
709 686
710 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, 687 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
711 &miss, // When not a string. 688 &miss, // When not a string.
712 &miss, // When not a number. 689 &miss, // When not a number.
713 &miss, // When index out of range. 690 &miss, // When index out of range.
714 STRING_INDEX_IS_ARRAY_INDEX); 691 STRING_INDEX_IS_ARRAY_INDEX);
715 char_at_generator.GenerateFast(masm); 692 char_at_generator.GenerateFast(masm);
716 __ Ret(); 693 __ Ret();
717 694
718 StubRuntimeCallHelper call_helper; 695 StubRuntimeCallHelper call_helper;
719 char_at_generator.GenerateSlow(masm, call_helper); 696 char_at_generator.GenerateSlow(masm, call_helper);
720 697
721 __ Bind(&miss); 698 __ Bind(&miss);
722 GenerateMiss(masm); 699 GenerateMiss(masm);
723 } 700 }
724 701
725 702
726 void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { 703 void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
727 // Return address is in lr. 704 // Return address is in lr.
728 Label slow; 705 Label slow;
729 706
730 Register receiver = ReceiverRegister(); 707 Register receiver = LoadConvention::ReceiverRegister();
731 Register key = NameRegister(); 708 Register key = LoadConvention::NameRegister();
732 Register scratch1 = x3; 709 Register scratch1 = x3;
733 Register scratch2 = x4; 710 Register scratch2 = x4;
734 DCHECK(!AreAliased(scratch1, scratch2, receiver, key)); 711 DCHECK(!AreAliased(scratch1, scratch2, receiver, key));
735 712
736 // Check that the receiver isn't a smi. 713 // Check that the receiver isn't a smi.
737 __ JumpIfSmi(receiver, &slow); 714 __ JumpIfSmi(receiver, &slow);
738 715
739 // Check that the key is an array index, that is Uint32. 716 // Check that the key is an array index, that is Uint32.
740 __ TestAndBranchIfAnySet(key, kSmiTagMask | kSmiSignMask, &slow); 717 __ TestAndBranchIfAnySet(key, kSmiTagMask | kSmiSignMask, &slow);
741 718
(...skipping 18 matching lines...) Expand all
760 737
761 __ Bind(&slow); 738 __ Bind(&slow);
762 GenerateMiss(masm); 739 GenerateMiss(masm);
763 } 740 }
764 741
765 742
766 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { 743 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
767 ASM_LOCATION("KeyedStoreIC::GenerateMiss"); 744 ASM_LOCATION("KeyedStoreIC::GenerateMiss");
768 745
769 // Push receiver, key and value for runtime call. 746 // Push receiver, key and value for runtime call.
770 __ Push(ReceiverRegister(), NameRegister(), ValueRegister()); 747 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
748 StoreConvention::ValueRegister());
771 749
772 ExternalReference ref = 750 ExternalReference ref =
773 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); 751 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
774 __ TailCallExternalReference(ref, 3, 1); 752 __ TailCallExternalReference(ref, 3, 1);
775 } 753 }
776 754
777 755
778 static void KeyedStoreGenerateGenericHelper( 756 static void KeyedStoreGenerateGenericHelper(
779 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, 757 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow,
780 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length, 758 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length,
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 StrictMode strict_mode) { 889 StrictMode strict_mode) {
912 ASM_LOCATION("KeyedStoreIC::GenerateGeneric"); 890 ASM_LOCATION("KeyedStoreIC::GenerateGeneric");
913 Label slow; 891 Label slow;
914 Label array; 892 Label array;
915 Label fast_object; 893 Label fast_object;
916 Label extra; 894 Label extra;
917 Label fast_object_grow; 895 Label fast_object_grow;
918 Label fast_double_grow; 896 Label fast_double_grow;
919 Label fast_double; 897 Label fast_double;
920 898
921 Register value = ValueRegister(); 899 Register value = StoreConvention::ValueRegister();
922 Register key = NameRegister(); 900 Register key = StoreConvention::NameRegister();
923 Register receiver = ReceiverRegister(); 901 Register receiver = StoreConvention::ReceiverRegister();
924 DCHECK(receiver.is(x1)); 902 DCHECK(receiver.is(x1));
925 DCHECK(key.is(x2)); 903 DCHECK(key.is(x2));
926 DCHECK(value.is(x0)); 904 DCHECK(value.is(x0));
927 905
928 Register receiver_map = x3; 906 Register receiver_map = x3;
929 Register elements = x4; 907 Register elements = x4;
930 Register elements_map = x5; 908 Register elements_map = x5;
931 909
932 __ JumpIfNotSmi(key, &slow); 910 __ JumpIfNotSmi(key, &slow);
933 __ JumpIfSmi(receiver, &slow); 911 __ JumpIfSmi(receiver, &slow);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 masm, &fast_object, &fast_double, &slow, kCheckMap, kDontIncrementLength, 979 masm, &fast_object, &fast_double, &slow, kCheckMap, kDontIncrementLength,
1002 value, key, receiver, receiver_map, elements_map, elements); 980 value, key, receiver, receiver_map, elements_map, elements);
1003 KeyedStoreGenerateGenericHelper(masm, &fast_object_grow, &fast_double_grow, 981 KeyedStoreGenerateGenericHelper(masm, &fast_object_grow, &fast_double_grow,
1004 &slow, kDontCheckMap, kIncrementLength, value, 982 &slow, kDontCheckMap, kIncrementLength, value,
1005 key, receiver, receiver_map, elements_map, 983 key, receiver, receiver_map, elements_map,
1006 elements); 984 elements);
1007 } 985 }
1008 986
1009 987
1010 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 988 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
1011 Register receiver = ReceiverRegister(); 989 Register receiver = StoreConvention::ReceiverRegister();
1012 Register name = NameRegister(); 990 Register name = StoreConvention::NameRegister();
1013 DCHECK(!AreAliased(receiver, name, ValueRegister(), x3, x4, x5, x6)); 991 DCHECK(!AreAliased(receiver, name, StoreConvention::ValueRegister(), x3, x4,
992 x5, x6));
1014 993
1015 // Probe the stub cache. 994 // Probe the stub cache.
1016 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 995 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
1017 Code::ComputeHandlerFlags(Code::STORE_IC)); 996 Code::ComputeHandlerFlags(Code::STORE_IC));
1018 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, x3, 997 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, x3,
1019 x4, x5, x6); 998 x4, x5, x6);
1020 999
1021 // Cache miss: Jump to runtime. 1000 // Cache miss: Jump to runtime.
1022 GenerateMiss(masm); 1001 GenerateMiss(masm);
1023 } 1002 }
1024 1003
1025 1004
1026 void StoreIC::GenerateMiss(MacroAssembler* masm) { 1005 void StoreIC::GenerateMiss(MacroAssembler* masm) {
1027 __ Push(ReceiverRegister(), NameRegister(), ValueRegister()); 1006 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
1007 StoreConvention::ValueRegister());
1028 1008
1029 // Tail call to the entry. 1009 // Tail call to the entry.
1030 ExternalReference ref = 1010 ExternalReference ref =
1031 ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate()); 1011 ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate());
1032 __ TailCallExternalReference(ref, 3, 1); 1012 __ TailCallExternalReference(ref, 3, 1);
1033 } 1013 }
1034 1014
1035 1015
1036 void StoreIC::GenerateNormal(MacroAssembler* masm) { 1016 void StoreIC::GenerateNormal(MacroAssembler* masm) {
1037 Label miss; 1017 Label miss;
1038 Register value = ValueRegister(); 1018 Register value = StoreConvention::ValueRegister();
1039 Register receiver = ReceiverRegister(); 1019 Register receiver = StoreConvention::ReceiverRegister();
1040 Register name = NameRegister(); 1020 Register name = StoreConvention::NameRegister();
1041 Register dictionary = x3; 1021 Register dictionary = x3;
1042 DCHECK(!AreAliased(value, receiver, name, x3, x4, x5)); 1022 DCHECK(!AreAliased(value, receiver, name, x3, x4, x5));
1043 1023
1044 __ Ldr(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); 1024 __ Ldr(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset));
1045 1025
1046 GenerateDictionaryStore(masm, &miss, dictionary, name, value, x4, x5); 1026 GenerateDictionaryStore(masm, &miss, dictionary, name, value, x4, x5);
1047 Counters* counters = masm->isolate()->counters(); 1027 Counters* counters = masm->isolate()->counters();
1048 __ IncrementCounter(counters->store_normal_hit(), 1, x4, x5); 1028 __ IncrementCounter(counters->store_normal_hit(), 1, x4, x5);
1049 __ Ret(); 1029 __ Ret();
1050 1030
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 } else { 1117 } else {
1138 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); 1118 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ);
1139 // This is JumpIfSmi(smi_reg, branch_imm). 1119 // This is JumpIfSmi(smi_reg, branch_imm).
1140 patcher.tbz(smi_reg, 0, branch_imm); 1120 patcher.tbz(smi_reg, 0, branch_imm);
1141 } 1121 }
1142 } 1122 }
1143 } 1123 }
1144 } // namespace v8::internal 1124 } // namespace v8::internal
1145 1125
1146 #endif // V8_TARGET_ARCH_ARM64 1126 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/arm64/ic-compiler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698