| 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 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 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 __ CheckMap(backing_store, fixed_array_map, slow_case, DONT_DO_SMI_CHECK); | 758 __ CheckMap(backing_store, fixed_array_map, slow_case, DONT_DO_SMI_CHECK); |
| 759 __ movp(scratch, FieldOperand(backing_store, FixedArray::kLengthOffset)); | 759 __ movp(scratch, FieldOperand(backing_store, FixedArray::kLengthOffset)); |
| 760 __ cmpp(key, scratch); | 760 __ cmpp(key, scratch); |
| 761 __ j(greater_equal, slow_case); | 761 __ j(greater_equal, slow_case); |
| 762 __ SmiToInteger64(scratch, key); | 762 __ SmiToInteger64(scratch, key); |
| 763 return FieldOperand(backing_store, scratch, times_pointer_size, | 763 return FieldOperand(backing_store, scratch, times_pointer_size, |
| 764 FixedArray::kHeaderSize); | 764 FixedArray::kHeaderSize); |
| 765 } | 765 } |
| 766 | 766 |
| 767 | 767 |
| 768 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { | |
| 769 // The return address is on the stack. | |
| 770 Register receiver = LoadDescriptor::ReceiverRegister(); | |
| 771 Register key = LoadDescriptor::NameRegister(); | |
| 772 DCHECK(receiver.is(rdx)); | |
| 773 DCHECK(key.is(rcx)); | |
| 774 | |
| 775 Label slow, notin; | |
| 776 Operand mapped_location = GenerateMappedArgumentsLookup( | |
| 777 masm, receiver, key, rbx, rax, rdi, ¬in, &slow); | |
| 778 __ movp(rax, mapped_location); | |
| 779 __ Ret(); | |
| 780 __ bind(¬in); | |
| 781 // The unmapped lookup expects that the parameter map is in rbx. | |
| 782 Operand unmapped_location = | |
| 783 GenerateUnmappedArgumentsLookup(masm, key, rbx, rax, &slow); | |
| 784 __ CompareRoot(unmapped_location, Heap::kTheHoleValueRootIndex); | |
| 785 __ j(equal, &slow); | |
| 786 __ movp(rax, unmapped_location); | |
| 787 __ Ret(); | |
| 788 __ bind(&slow); | |
| 789 GenerateMiss(masm); | |
| 790 } | |
| 791 | |
| 792 | |
| 793 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { | 768 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { |
| 794 // The return address is on the stack. | 769 // The return address is on the stack. |
| 795 Label slow, notin; | 770 Label slow, notin; |
| 796 Register receiver = StoreDescriptor::ReceiverRegister(); | 771 Register receiver = StoreDescriptor::ReceiverRegister(); |
| 797 Register name = StoreDescriptor::NameRegister(); | 772 Register name = StoreDescriptor::NameRegister(); |
| 798 Register value = StoreDescriptor::ValueRegister(); | 773 Register value = StoreDescriptor::ValueRegister(); |
| 799 DCHECK(receiver.is(rdx)); | 774 DCHECK(receiver.is(rdx)); |
| 800 DCHECK(name.is(rcx)); | 775 DCHECK(name.is(rcx)); |
| 801 DCHECK(value.is(rax)); | 776 DCHECK(value.is(rax)); |
| 802 | 777 |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 Condition cc = | 1024 Condition cc = |
| 1050 (check == ENABLE_INLINED_SMI_CHECK) | 1025 (check == ENABLE_INLINED_SMI_CHECK) |
| 1051 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1026 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
| 1052 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1027 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
| 1053 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1028 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 1054 } | 1029 } |
| 1055 } | 1030 } |
| 1056 } // namespace v8::internal | 1031 } // namespace v8::internal |
| 1057 | 1032 |
| 1058 #endif // V8_TARGET_ARCH_X64 | 1033 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |