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

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

Issue 390263002: MIPS: 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/mips/code-stubs-mips.cc ('k') | src/mips/stub-cache-mips.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 5
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 __ mov(v0, a0); 503 __ mov(v0, a0);
504 __ bind(&slow); 504 __ bind(&slow);
505 GenerateMiss(masm); 505 GenerateMiss(masm);
506 } 506 }
507 507
508 508
509 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { 509 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
510 Register receiver = ReceiverRegister(); 510 Register receiver = ReceiverRegister();
511 Register key = NameRegister(); 511 Register key = NameRegister();
512 Register value = ValueRegister(); 512 Register value = ValueRegister();
513 ASSERT(receiver.is(a2));
514 ASSERT(key.is(a1));
515 ASSERT(value.is(a0)); 513 ASSERT(value.is(a0));
516 514
517 Label slow, notin; 515 Label slow, notin;
518 // Store address is returned in register (of MemOperand) mapped_location. 516 // Store address is returned in register (of MemOperand) mapped_location.
519 MemOperand mapped_location = GenerateMappedArgumentsLookup( 517 MemOperand mapped_location = GenerateMappedArgumentsLookup(
520 masm, receiver, key, a3, t0, t1, &notin, &slow); 518 masm, receiver, key, a3, t0, t1, &notin, &slow);
521 __ sw(value, mapped_location); 519 __ sw(value, mapped_location);
522 __ mov(t5, value); 520 __ mov(t5, value);
523 ASSERT_EQ(mapped_location.offset(), 0); 521 ASSERT_EQ(mapped_location.offset(), 0);
524 __ RecordWrite(a3, mapped_location.rm(), t5, 522 __ RecordWrite(a3, mapped_location.rm(), t5,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 // IC register specifications 559 // IC register specifications
562 const Register LoadIC::ReceiverRegister() { return a1; } 560 const Register LoadIC::ReceiverRegister() { return a1; }
563 const Register LoadIC::NameRegister() { return a2; } 561 const Register LoadIC::NameRegister() { return a2; }
564 562
565 563
566 const Register StoreIC::ReceiverRegister() { return a1; } 564 const Register StoreIC::ReceiverRegister() { return a1; }
567 const Register StoreIC::NameRegister() { return a2; } 565 const Register StoreIC::NameRegister() { return a2; }
568 const Register StoreIC::ValueRegister() { return a0; } 566 const Register StoreIC::ValueRegister() { return a0; }
569 567
570 568
571 const Register KeyedStoreIC::ReceiverRegister() { return a2; } 569 const Register KeyedStoreIC::ReceiverRegister() {
572 const Register KeyedStoreIC::NameRegister() { return a1; } 570 return StoreIC::ReceiverRegister();
573 const Register KeyedStoreIC::ValueRegister() { return a0; } 571 }
572
573
574 const Register KeyedStoreIC::NameRegister() {
575 return StoreIC::NameRegister();
576 }
577
578
579 const Register KeyedStoreIC::ValueRegister() {
580 return StoreIC::ValueRegister();
581 }
582
583
584 const Register KeyedStoreIC::MapRegister() {
585 return a3;
586 }
574 587
575 588
576 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 589 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
577 // The return address is in ra. 590 // The return address is in ra.
578 591
579 __ Push(ReceiverRegister(), NameRegister()); 592 __ Push(ReceiverRegister(), NameRegister());
580 593
581 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); 594 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
582 } 595 }
583 596
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 // -- ra : return address 986 // -- ra : return address
974 // ----------------------------------- 987 // -----------------------------------
975 Label slow, fast_object, fast_object_grow; 988 Label slow, fast_object, fast_object_grow;
976 Label fast_double, fast_double_grow; 989 Label fast_double, fast_double_grow;
977 Label array, extra, check_if_double_array; 990 Label array, extra, check_if_double_array;
978 991
979 // Register usage. 992 // Register usage.
980 Register value = ValueRegister(); 993 Register value = ValueRegister();
981 Register key = NameRegister(); 994 Register key = NameRegister();
982 Register receiver = ReceiverRegister(); 995 Register receiver = ReceiverRegister();
983 ASSERT(receiver.is(a2));
984 ASSERT(key.is(a1));
985 ASSERT(value.is(a0)); 996 ASSERT(value.is(a0));
986 Register receiver_map = a3; 997 Register receiver_map = a3;
987 Register elements_map = t2; 998 Register elements_map = t2;
988 Register elements = t3; // Elements array of the receiver. 999 Register elements = t3; // Elements array of the receiver.
989 // t0 and t1 are used as general scratch registers. 1000 // t0 and t1 are used as general scratch registers.
990 1001
991 // Check that the key is a smi. 1002 // Check that the key is a smi.
992 __ JumpIfNotSmi(key, &slow); 1003 __ JumpIfNotSmi(key, &slow);
993 // Check that the object isn't a smi. 1004 // Check that the object isn't a smi.
994 __ JumpIfSmi(receiver, &slow); 1005 __ JumpIfSmi(receiver, &slow);
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 } else { 1300 } else {
1290 ASSERT(Assembler::IsBne(branch_instr)); 1301 ASSERT(Assembler::IsBne(branch_instr));
1291 patcher.ChangeBranchCondition(eq); 1302 patcher.ChangeBranchCondition(eq);
1292 } 1303 }
1293 } 1304 }
1294 1305
1295 1306
1296 } } // namespace v8::internal 1307 } } // namespace v8::internal
1297 1308
1298 #endif // V8_TARGET_ARCH_MIPS 1309 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698