| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2390 InstanceofStub stub(flags); | 2390 InstanceofStub stub(flags); |
| 2391 | 2391 |
| 2392 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 2392 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); |
| 2393 | 2393 |
| 2394 // Get the temp register reserved by the instruction. This needs to be r4 as | 2394 // Get the temp register reserved by the instruction. This needs to be r4 as |
| 2395 // its slot of the pushing of safepoint registers is used to communicate the | 2395 // its slot of the pushing of safepoint registers is used to communicate the |
| 2396 // offset to the location of the map check. | 2396 // offset to the location of the map check. |
| 2397 Register temp = ToRegister(instr->TempAt(0)); | 2397 Register temp = ToRegister(instr->TempAt(0)); |
| 2398 ASSERT(temp.is(r4)); | 2398 ASSERT(temp.is(r4)); |
| 2399 __ LoadHeapObject(InstanceofStub::right(), instr->function()); | 2399 __ LoadHeapObject(InstanceofStub::right(), instr->function()); |
| 2400 static const int kAdditionalDelta = 4; | 2400 static const int kAdditionalDelta = 5; |
| 2401 int delta = masm_->InstructionsGeneratedSince(map_check) + kAdditionalDelta; | 2401 int delta = masm_->InstructionsGeneratedSince(map_check) + kAdditionalDelta; |
| 2402 Label before_push_delta; | 2402 Label before_push_delta; |
| 2403 __ bind(&before_push_delta); | 2403 __ bind(&before_push_delta); |
| 2404 __ BlockConstPoolFor(kAdditionalDelta); | 2404 __ BlockConstPoolFor(kAdditionalDelta); |
| 2405 __ mov(temp, Operand(delta * kPointerSize)); | 2405 __ mov(temp, Operand(delta * kPointerSize)); |
| 2406 // The mov above can generate one or two instructions. The delta was computed |
| 2407 // for two instructions, so we need to pad here in case of one instruction. |
| 2408 if (masm_->InstructionsGeneratedSince(&before_push_delta) != 2) { |
| 2409 ASSERT_EQ(1, masm_->InstructionsGeneratedSince(&before_push_delta)); |
| 2410 __ nop(); |
| 2411 } |
| 2406 __ StoreToSafepointRegisterSlot(temp, temp); | 2412 __ StoreToSafepointRegisterSlot(temp, temp); |
| 2407 CallCodeGeneric(stub.GetCode(), | 2413 CallCodeGeneric(stub.GetCode(), |
| 2408 RelocInfo::CODE_TARGET, | 2414 RelocInfo::CODE_TARGET, |
| 2409 instr, | 2415 instr, |
| 2410 RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); | 2416 RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); |
| 2411 LEnvironment* env = instr->GetDeferredLazyDeoptimizationEnvironment(); | 2417 LEnvironment* env = instr->GetDeferredLazyDeoptimizationEnvironment(); |
| 2412 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); | 2418 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |
| 2413 // Put the result value into the result register slot and | 2419 // Put the result value into the result register slot and |
| 2414 // restore all registers. | 2420 // restore all registers. |
| 2415 __ StoreToSafepointRegisterSlot(result, result); | 2421 __ StoreToSafepointRegisterSlot(result, result); |
| (...skipping 3048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5464 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 5470 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
| 5465 __ ldr(result, FieldMemOperand(scratch, | 5471 __ ldr(result, FieldMemOperand(scratch, |
| 5466 FixedArray::kHeaderSize - kPointerSize)); | 5472 FixedArray::kHeaderSize - kPointerSize)); |
| 5467 __ bind(&done); | 5473 __ bind(&done); |
| 5468 } | 5474 } |
| 5469 | 5475 |
| 5470 | 5476 |
| 5471 #undef __ | 5477 #undef __ |
| 5472 | 5478 |
| 5473 } } // namespace v8::internal | 5479 } } // namespace v8::internal |
| OLD | NEW |