OLD | NEW |
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_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
10 | 10 |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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, a4, a5, ¬in, &slow); | 518 masm, receiver, key, a3, a4, a5, ¬in, &slow); |
521 __ sd(value, mapped_location); | 519 __ sd(value, mapped_location); |
522 __ mov(t1, value); | 520 __ mov(t1, value); |
523 ASSERT_EQ(mapped_location.offset(), 0); | 521 ASSERT_EQ(mapped_location.offset(), 0); |
524 __ RecordWrite(a3, mapped_location.rm(), t1, | 522 __ RecordWrite(a3, mapped_location.rm(), t1, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
984 // -- ra : return address | 997 // -- ra : return address |
985 // ----------------------------------- | 998 // ----------------------------------- |
986 Label slow, fast_object, fast_object_grow; | 999 Label slow, fast_object, fast_object_grow; |
987 Label fast_double, fast_double_grow; | 1000 Label fast_double, fast_double_grow; |
988 Label array, extra, check_if_double_array; | 1001 Label array, extra, check_if_double_array; |
989 | 1002 |
990 // Register usage. | 1003 // Register usage. |
991 Register value = ValueRegister(); | 1004 Register value = ValueRegister(); |
992 Register key = NameRegister(); | 1005 Register key = NameRegister(); |
993 Register receiver = ReceiverRegister(); | 1006 Register receiver = ReceiverRegister(); |
994 ASSERT(receiver.is(a2)); | |
995 ASSERT(key.is(a1)); | |
996 ASSERT(value.is(a0)); | 1007 ASSERT(value.is(a0)); |
997 Register receiver_map = a3; | 1008 Register receiver_map = a3; |
998 Register elements_map = a6; | 1009 Register elements_map = a6; |
999 Register elements = a7; // Elements array of the receiver. | 1010 Register elements = a7; // Elements array of the receiver. |
1000 // a4 and a5 are used as general scratch registers. | 1011 // a4 and a5 are used as general scratch registers. |
1001 | 1012 |
1002 // Check that the key is a smi. | 1013 // Check that the key is a smi. |
1003 __ JumpIfNotSmi(key, &slow); | 1014 __ JumpIfNotSmi(key, &slow); |
1004 // Check that the object isn't a smi. | 1015 // Check that the object isn't a smi. |
1005 __ JumpIfSmi(receiver, &slow); | 1016 __ JumpIfSmi(receiver, &slow); |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1299 } else { | 1310 } else { |
1300 ASSERT(Assembler::IsBne(branch_instr)); | 1311 ASSERT(Assembler::IsBne(branch_instr)); |
1301 patcher.ChangeBranchCondition(eq); | 1312 patcher.ChangeBranchCondition(eq); |
1302 } | 1313 } |
1303 } | 1314 } |
1304 | 1315 |
1305 | 1316 |
1306 } } // namespace v8::internal | 1317 } } // namespace v8::internal |
1307 | 1318 |
1308 #endif // V8_TARGET_ARCH_MIPS64 | 1319 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |