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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/arm/assembler-arm.h" | 9 #include "src/arm/assembler-arm.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 __ Ret(); | 493 __ Ret(); |
494 __ bind(&slow); | 494 __ bind(&slow); |
495 GenerateMiss(masm); | 495 GenerateMiss(masm); |
496 } | 496 } |
497 | 497 |
498 | 498 |
499 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { | 499 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { |
500 Register receiver = ReceiverRegister(); | 500 Register receiver = ReceiverRegister(); |
501 Register key = NameRegister(); | 501 Register key = NameRegister(); |
502 Register value = ValueRegister(); | 502 Register value = ValueRegister(); |
503 ASSERT(receiver.is(r2)); | 503 ASSERT(receiver.is(r1)); |
504 ASSERT(key.is(r1)); | 504 ASSERT(key.is(r2)); |
505 ASSERT(value.is(r0)); | 505 ASSERT(value.is(r0)); |
506 | 506 |
507 Label slow, notin; | 507 Label slow, notin; |
508 MemOperand mapped_location = GenerateMappedArgumentsLookup( | 508 MemOperand mapped_location = GenerateMappedArgumentsLookup( |
509 masm, receiver, key, r3, r4, r5, ¬in, &slow); | 509 masm, receiver, key, r3, r4, r5, ¬in, &slow); |
510 __ str(value, mapped_location); | 510 __ str(value, mapped_location); |
511 __ add(r6, r3, r5); | 511 __ add(r6, r3, r5); |
512 __ mov(r9, value); | 512 __ mov(r9, value); |
513 __ RecordWrite(r3, r6, r9, kLRHasNotBeenSaved, kDontSaveFPRegs); | 513 __ RecordWrite(r3, r6, r9, kLRHasNotBeenSaved, kDontSaveFPRegs); |
514 __ Ret(); | 514 __ Ret(); |
(...skipping 30 matching lines...) Expand all Loading... |
545 // IC register specifications | 545 // IC register specifications |
546 const Register LoadIC::ReceiverRegister() { return r1; } | 546 const Register LoadIC::ReceiverRegister() { return r1; } |
547 const Register LoadIC::NameRegister() { return r2; } | 547 const Register LoadIC::NameRegister() { return r2; } |
548 | 548 |
549 | 549 |
550 const Register StoreIC::ReceiverRegister() { return r1; } | 550 const Register StoreIC::ReceiverRegister() { return r1; } |
551 const Register StoreIC::NameRegister() { return r2; } | 551 const Register StoreIC::NameRegister() { return r2; } |
552 const Register StoreIC::ValueRegister() { return r0; } | 552 const Register StoreIC::ValueRegister() { return r0; } |
553 | 553 |
554 | 554 |
555 const Register KeyedStoreIC::ReceiverRegister() { return r2; } | 555 const Register KeyedStoreIC::ReceiverRegister() { |
556 const Register KeyedStoreIC::NameRegister() { return r1; } | 556 return StoreIC::ReceiverRegister(); |
557 const Register KeyedStoreIC::ValueRegister() { return r0; } | 557 } |
| 558 |
| 559 |
| 560 const Register KeyedStoreIC::NameRegister() { |
| 561 return StoreIC::NameRegister(); |
| 562 } |
| 563 |
| 564 |
| 565 const Register KeyedStoreIC::ValueRegister() { |
| 566 return StoreIC::ValueRegister(); |
| 567 } |
| 568 |
| 569 |
| 570 const Register KeyedStoreIC::MapRegister() { |
| 571 return r3; |
| 572 } |
558 | 573 |
559 | 574 |
560 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { | 575 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { |
561 // The return address is in lr. | 576 // The return address is in lr. |
562 | 577 |
563 __ Push(ReceiverRegister(), NameRegister()); | 578 __ Push(ReceiverRegister(), NameRegister()); |
564 | 579 |
565 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); | 580 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); |
566 } | 581 } |
567 | 582 |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 // -- lr : return address | 1036 // -- lr : return address |
1022 // ----------------------------------- | 1037 // ----------------------------------- |
1023 Label slow, fast_object, fast_object_grow; | 1038 Label slow, fast_object, fast_object_grow; |
1024 Label fast_double, fast_double_grow; | 1039 Label fast_double, fast_double_grow; |
1025 Label array, extra, check_if_double_array; | 1040 Label array, extra, check_if_double_array; |
1026 | 1041 |
1027 // Register usage. | 1042 // Register usage. |
1028 Register value = ValueRegister(); | 1043 Register value = ValueRegister(); |
1029 Register key = NameRegister(); | 1044 Register key = NameRegister(); |
1030 Register receiver = ReceiverRegister(); | 1045 Register receiver = ReceiverRegister(); |
1031 ASSERT(receiver.is(r2)); | 1046 ASSERT(receiver.is(r1)); |
1032 ASSERT(key.is(r1)); | 1047 ASSERT(key.is(r2)); |
1033 ASSERT(value.is(r0)); | 1048 ASSERT(value.is(r0)); |
1034 Register receiver_map = r3; | 1049 Register receiver_map = r3; |
1035 Register elements_map = r6; | 1050 Register elements_map = r6; |
1036 Register elements = r9; // Elements array of the receiver. | 1051 Register elements = r9; // Elements array of the receiver. |
1037 // r4 and r5 are used as general scratch registers. | 1052 // r4 and r5 are used as general scratch registers. |
1038 | 1053 |
1039 // Check that the key is a smi. | 1054 // Check that the key is a smi. |
1040 __ JumpIfNotSmi(key, &slow); | 1055 __ JumpIfNotSmi(key, &slow); |
1041 // Check that the object isn't a smi. | 1056 // Check that the object isn't a smi. |
1042 __ JumpIfSmi(receiver, &slow); | 1057 __ JumpIfSmi(receiver, &slow); |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1271 } else { | 1286 } else { |
1272 ASSERT(Assembler::GetCondition(branch_instr) == ne); | 1287 ASSERT(Assembler::GetCondition(branch_instr) == ne); |
1273 patcher.EmitCondition(eq); | 1288 patcher.EmitCondition(eq); |
1274 } | 1289 } |
1275 } | 1290 } |
1276 | 1291 |
1277 | 1292 |
1278 } } // namespace v8::internal | 1293 } } // namespace v8::internal |
1279 | 1294 |
1280 #endif // V8_TARGET_ARCH_ARM | 1295 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |