| 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 2238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2249 InstanceofStub stub(flags); | 2249 InstanceofStub stub(flags); |
| 2250 | 2250 |
| 2251 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 2251 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); |
| 2252 | 2252 |
| 2253 // Get the temp register reserved by the instruction. This needs to be r4 as | 2253 // Get the temp register reserved by the instruction. This needs to be r4 as |
| 2254 // its slot of the pushing of safepoint registers is used to communicate the | 2254 // its slot of the pushing of safepoint registers is used to communicate the |
| 2255 // offset to the location of the map check. | 2255 // offset to the location of the map check. |
| 2256 Register temp = ToRegister(instr->TempAt(0)); | 2256 Register temp = ToRegister(instr->TempAt(0)); |
| 2257 ASSERT(temp.is(r4)); | 2257 ASSERT(temp.is(r4)); |
| 2258 __ LoadHeapObject(InstanceofStub::right(), instr->function()); | 2258 __ LoadHeapObject(InstanceofStub::right(), instr->function()); |
| 2259 static const int kAdditionalDelta = 4; | 2259 static const int kAdditionalDelta = 5; |
| 2260 int delta = masm_->InstructionsGeneratedSince(map_check) + kAdditionalDelta; | 2260 int delta = masm_->InstructionsGeneratedSince(map_check) + kAdditionalDelta; |
| 2261 Label before_push_delta; | 2261 Label before_push_delta; |
| 2262 __ bind(&before_push_delta); | 2262 __ bind(&before_push_delta); |
| 2263 __ BlockConstPoolFor(kAdditionalDelta); | 2263 __ BlockConstPoolFor(kAdditionalDelta); |
| 2264 __ mov(temp, Operand(delta * kPointerSize)); | 2264 __ mov(temp, Operand(delta * kPointerSize)); |
| 2265 // The mov above can generate one or two instructions. The delta was computed |
| 2266 // for two instructions, so we need to pad here in case of one instruction. |
| 2267 if (masm_->InstructionsGeneratedSince(&before_push_delta) != 2) { |
| 2268 ASSERT_EQ(1, masm_->InstructionsGeneratedSince(&before_push_delta)); |
| 2269 __ nop(); |
| 2270 } |
| 2265 __ StoreToSafepointRegisterSlot(temp, temp); | 2271 __ StoreToSafepointRegisterSlot(temp, temp); |
| 2266 CallCodeGeneric(stub.GetCode(), | 2272 CallCodeGeneric(stub.GetCode(), |
| 2267 RelocInfo::CODE_TARGET, | 2273 RelocInfo::CODE_TARGET, |
| 2268 instr, | 2274 instr, |
| 2269 RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); | 2275 RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); |
| 2270 ASSERT(instr->HasDeoptimizationEnvironment()); | 2276 ASSERT(instr->HasDeoptimizationEnvironment()); |
| 2271 LEnvironment* env = instr->deoptimization_environment(); | 2277 LEnvironment* env = instr->deoptimization_environment(); |
| 2272 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); | 2278 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |
| 2273 // Put the result value into the result register slot and | 2279 // Put the result value into the result register slot and |
| 2274 // restore all registers. | 2280 // restore all registers. |
| (...skipping 2854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5129 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 5135 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
| 5130 __ ldr(result, FieldMemOperand(scratch, | 5136 __ ldr(result, FieldMemOperand(scratch, |
| 5131 FixedArray::kHeaderSize - kPointerSize)); | 5137 FixedArray::kHeaderSize - kPointerSize)); |
| 5132 __ bind(&done); | 5138 __ bind(&done); |
| 5133 } | 5139 } |
| 5134 | 5140 |
| 5135 | 5141 |
| 5136 #undef __ | 5142 #undef __ |
| 5137 | 5143 |
| 5138 } } // namespace v8::internal | 5144 } } // namespace v8::internal |
| OLD | NEW |