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

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

Issue 390013002: Use the same registers for StoreIC and KeyedStoreIC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/arm64/code-stubs-arm64.cc ('k') | src/arm64/stub-cache-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/arm64/assembler-arm64.h" 9 #include "src/arm64/assembler-arm64.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 GenerateMiss(masm); 499 GenerateMiss(masm);
500 } 500 }
501 501
502 502
503 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { 503 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
504 ASM_LOCATION("KeyedStoreIC::GenerateSloppyArguments"); 504 ASM_LOCATION("KeyedStoreIC::GenerateSloppyArguments");
505 Label slow, notin; 505 Label slow, notin;
506 Register value = ValueRegister(); 506 Register value = ValueRegister();
507 Register key = NameRegister(); 507 Register key = NameRegister();
508 Register receiver = ReceiverRegister(); 508 Register receiver = ReceiverRegister();
509 ASSERT(receiver.is(x2)); 509 ASSERT(receiver.is(x1));
510 ASSERT(key.is(x1)); 510 ASSERT(key.is(x2));
511 ASSERT(value.is(x0)); 511 ASSERT(value.is(x0));
512 512
513 Register map = x3; 513 Register map = x3;
514 514
515 // These registers are used by GenerateMappedArgumentsLookup to build a 515 // These registers are used by GenerateMappedArgumentsLookup to build a
516 // MemOperand. They are live for as long as the MemOperand is live. 516 // MemOperand. They are live for as long as the MemOperand is live.
517 Register mapped1 = x4; 517 Register mapped1 = x4;
518 Register mapped2 = x5; 518 Register mapped2 = x5;
519 519
520 MemOperand mapped = 520 MemOperand mapped =
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 // IC register specifications 567 // IC register specifications
568 const Register LoadIC::ReceiverRegister() { return x1; } 568 const Register LoadIC::ReceiverRegister() { return x1; }
569 const Register LoadIC::NameRegister() { return x2; } 569 const Register LoadIC::NameRegister() { return x2; }
570 570
571 571
572 const Register StoreIC::ReceiverRegister() { return x1; } 572 const Register StoreIC::ReceiverRegister() { return x1; }
573 const Register StoreIC::NameRegister() { return x2; } 573 const Register StoreIC::NameRegister() { return x2; }
574 const Register StoreIC::ValueRegister() { return x0; } 574 const Register StoreIC::ValueRegister() { return x0; }
575 575
576 576
577 const Register KeyedStoreIC::ReceiverRegister() { return x2; } 577 const Register KeyedStoreIC::ReceiverRegister() {
578 const Register KeyedStoreIC::NameRegister() { return x1; } 578 return StoreIC::ReceiverRegister();
579 const Register KeyedStoreIC::ValueRegister() { return x0; } 579 }
580
581
582 const Register KeyedStoreIC::NameRegister() {
583 return StoreIC::NameRegister();
584 }
585
586
587 const Register KeyedStoreIC::ValueRegister() {
588 return StoreIC::ValueRegister();
589 }
590
591
592 const Register KeyedStoreIC::MapRegister() {
593 return x3;
594 }
580 595
581 596
582 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 597 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
583 // The return address is in lr. 598 // The return address is in lr.
584 __ Push(ReceiverRegister(), NameRegister()); 599 __ Push(ReceiverRegister(), NameRegister());
585 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); 600 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
586 } 601 }
587 602
588 603
589 static void GenerateKeyedLoadWithSmiKey(MacroAssembler* masm, 604 static void GenerateKeyedLoadWithSmiKey(MacroAssembler* masm,
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 Label array; 1076 Label array;
1062 Label fast_object; 1077 Label fast_object;
1063 Label extra; 1078 Label extra;
1064 Label fast_object_grow; 1079 Label fast_object_grow;
1065 Label fast_double_grow; 1080 Label fast_double_grow;
1066 Label fast_double; 1081 Label fast_double;
1067 1082
1068 Register value = ValueRegister(); 1083 Register value = ValueRegister();
1069 Register key = NameRegister(); 1084 Register key = NameRegister();
1070 Register receiver = ReceiverRegister(); 1085 Register receiver = ReceiverRegister();
1071 ASSERT(receiver.is(x2)); 1086 ASSERT(receiver.is(x1));
1072 ASSERT(key.is(x1)); 1087 ASSERT(key.is(x2));
1073 ASSERT(value.is(x0)); 1088 ASSERT(value.is(x0));
1074 1089
1075 Register receiver_map = x3; 1090 Register receiver_map = x3;
1076 Register elements = x4; 1091 Register elements = x4;
1077 Register elements_map = x5; 1092 Register elements_map = x5;
1078 1093
1079 __ JumpIfNotSmi(key, &slow); 1094 __ JumpIfNotSmi(key, &slow);
1080 __ JumpIfSmi(receiver, &slow); 1095 __ JumpIfSmi(receiver, &slow);
1081 __ Ldr(receiver_map, FieldMemOperand(receiver, HeapObject::kMapOffset)); 1096 __ Ldr(receiver_map, FieldMemOperand(receiver, HeapObject::kMapOffset));
1082 1097
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 ASSERT(to_patch->Mask(TestBranchMask) == TBNZ); 1336 ASSERT(to_patch->Mask(TestBranchMask) == TBNZ);
1322 // This is JumpIfSmi(smi_reg, branch_imm). 1337 // This is JumpIfSmi(smi_reg, branch_imm).
1323 patcher.tbz(smi_reg, 0, branch_imm); 1338 patcher.tbz(smi_reg, 0, branch_imm);
1324 } 1339 }
1325 } 1340 }
1326 1341
1327 1342
1328 } } // namespace v8::internal 1343 } } // namespace v8::internal
1329 1344
1330 #endif // V8_TARGET_ARCH_ARM64 1345 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/arm64/stub-cache-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698