| 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 #include "src/v8.h" | 6 #include "src/v8.h" |
| 7 | 7 |
| 8 #if V8_TARGET_ARCH_MIPS64 | 8 #if V8_TARGET_ARCH_MIPS64 |
| 9 | 9 |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 __ ld(scratch, FieldMemOperand(backing_store, FixedArray::kLengthOffset)); | 365 __ ld(scratch, FieldMemOperand(backing_store, FixedArray::kLengthOffset)); |
| 366 __ Branch(slow_case, Ugreater_equal, key, Operand(scratch)); | 366 __ Branch(slow_case, Ugreater_equal, key, Operand(scratch)); |
| 367 __ SmiUntag(scratch, key); | 367 __ SmiUntag(scratch, key); |
| 368 __ dsll(scratch, scratch, kPointerSizeLog2); | 368 __ dsll(scratch, scratch, kPointerSizeLog2); |
| 369 __ Daddu(scratch, scratch, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | 369 __ Daddu(scratch, scratch, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
| 370 __ Daddu(scratch, backing_store, scratch); | 370 __ Daddu(scratch, backing_store, scratch); |
| 371 return MemOperand(scratch); | 371 return MemOperand(scratch); |
| 372 } | 372 } |
| 373 | 373 |
| 374 | 374 |
| 375 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { | |
| 376 // The return address is in ra. | |
| 377 Register receiver = LoadDescriptor::ReceiverRegister(); | |
| 378 Register key = LoadDescriptor::NameRegister(); | |
| 379 DCHECK(receiver.is(a1)); | |
| 380 DCHECK(key.is(a2)); | |
| 381 | |
| 382 Label slow, notin; | |
| 383 MemOperand mapped_location = GenerateMappedArgumentsLookup( | |
| 384 masm, receiver, key, a0, a3, a4, ¬in, &slow); | |
| 385 __ Ret(USE_DELAY_SLOT); | |
| 386 __ ld(v0, mapped_location); | |
| 387 __ bind(¬in); | |
| 388 // The unmapped lookup expects that the parameter map is in a2. | |
| 389 MemOperand unmapped_location = | |
| 390 GenerateUnmappedArgumentsLookup(masm, key, a0, a3, &slow); | |
| 391 __ ld(a0, unmapped_location); | |
| 392 __ LoadRoot(a3, Heap::kTheHoleValueRootIndex); | |
| 393 __ Branch(&slow, eq, a0, Operand(a3)); | |
| 394 __ Ret(USE_DELAY_SLOT); | |
| 395 __ mov(v0, a0); | |
| 396 __ bind(&slow); | |
| 397 GenerateMiss(masm); | |
| 398 } | |
| 399 | |
| 400 | |
| 401 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { | 375 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { |
| 402 Register receiver = StoreDescriptor::ReceiverRegister(); | 376 Register receiver = StoreDescriptor::ReceiverRegister(); |
| 403 Register key = StoreDescriptor::NameRegister(); | 377 Register key = StoreDescriptor::NameRegister(); |
| 404 Register value = StoreDescriptor::ValueRegister(); | 378 Register value = StoreDescriptor::ValueRegister(); |
| 405 DCHECK(value.is(a0)); | 379 DCHECK(value.is(a0)); |
| 406 | 380 |
| 407 Label slow, notin; | 381 Label slow, notin; |
| 408 // Store address is returned in register (of MemOperand) mapped_location. | 382 // Store address is returned in register (of MemOperand) mapped_location. |
| 409 MemOperand mapped_location = GenerateMappedArgumentsLookup( | 383 MemOperand mapped_location = GenerateMappedArgumentsLookup( |
| 410 masm, receiver, key, a3, a4, a5, ¬in, &slow); | 384 masm, receiver, key, a3, a4, a5, ¬in, &slow); |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1048 patcher.ChangeBranchCondition(ne); | 1022 patcher.ChangeBranchCondition(ne); |
| 1049 } else { | 1023 } else { |
| 1050 DCHECK(Assembler::IsBne(branch_instr)); | 1024 DCHECK(Assembler::IsBne(branch_instr)); |
| 1051 patcher.ChangeBranchCondition(eq); | 1025 patcher.ChangeBranchCondition(eq); |
| 1052 } | 1026 } |
| 1053 } | 1027 } |
| 1054 } | 1028 } |
| 1055 } // namespace v8::internal | 1029 } // namespace v8::internal |
| 1056 | 1030 |
| 1057 #endif // V8_TARGET_ARCH_MIPS64 | 1031 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |