| 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/crankshaft/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
| 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
| (...skipping 5317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5328 if (instr->hydrogen()->IsOldSpaceAllocation()) { | 5328 if (instr->hydrogen()->IsOldSpaceAllocation()) { |
| 5329 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 5329 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
| 5330 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); | 5330 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); |
| 5331 } | 5331 } |
| 5332 // If the allocation folding dominator allocate triggered a GC, allocation | 5332 // If the allocation folding dominator allocate triggered a GC, allocation |
| 5333 // happend in the runtime. We have to reset the top pointer to virtually | 5333 // happend in the runtime. We have to reset the top pointer to virtually |
| 5334 // undo the allocation. | 5334 // undo the allocation. |
| 5335 ExternalReference allocation_top = | 5335 ExternalReference allocation_top = |
| 5336 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); | 5336 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); |
| 5337 Register top_address = scratch0(); | 5337 Register top_address = scratch0(); |
| 5338 __ Dsubu(v0, v0, Operand(kHeapObjectTag)); | |
| 5339 __ li(top_address, Operand(allocation_top)); | 5338 __ li(top_address, Operand(allocation_top)); |
| 5340 __ sd(v0, MemOperand(top_address)); | 5339 __ sd(v0, MemOperand(top_address)); |
| 5341 __ Daddu(v0, v0, Operand(kHeapObjectTag)); | |
| 5342 } | 5340 } |
| 5343 } | 5341 } |
| 5344 | 5342 |
| 5345 void LCodeGen::DoFastAllocate(LFastAllocate* instr) { | 5343 void LCodeGen::DoFastAllocate(LFastAllocate* instr) { |
| 5346 DCHECK(instr->hydrogen()->IsAllocationFolded()); | 5344 DCHECK(instr->hydrogen()->IsAllocationFolded()); |
| 5347 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator()); | 5345 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator()); |
| 5348 Register result = ToRegister(instr->result()); | 5346 Register result = ToRegister(instr->result()); |
| 5349 Register scratch1 = ToRegister(instr->temp1()); | 5347 Register scratch1 = ToRegister(instr->temp1()); |
| 5350 Register scratch2 = ToRegister(instr->temp2()); | 5348 Register scratch2 = ToRegister(instr->temp2()); |
| 5351 | 5349 |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5751 __ ld(result, FieldMemOperand(scratch, | 5749 __ ld(result, FieldMemOperand(scratch, |
| 5752 FixedArray::kHeaderSize - kPointerSize)); | 5750 FixedArray::kHeaderSize - kPointerSize)); |
| 5753 __ bind(deferred->exit()); | 5751 __ bind(deferred->exit()); |
| 5754 __ bind(&done); | 5752 __ bind(&done); |
| 5755 } | 5753 } |
| 5756 | 5754 |
| 5757 #undef __ | 5755 #undef __ |
| 5758 | 5756 |
| 5759 } // namespace internal | 5757 } // namespace internal |
| 5760 } // namespace v8 | 5758 } // namespace v8 |
| OLD | NEW |