OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/arm64/lithium-codegen-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
6 | 6 |
7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1548 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags); | 1548 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags); |
1549 } else { | 1549 } else { |
1550 Register size = ToRegister32(instr->size()); | 1550 Register size = ToRegister32(instr->size()); |
1551 __ Sxtw(size.X(), size); | 1551 __ Sxtw(size.X(), size); |
1552 __ Allocate(size.X(), result, temp1, temp2, deferred->entry(), flags); | 1552 __ Allocate(size.X(), result, temp1, temp2, deferred->entry(), flags); |
1553 } | 1553 } |
1554 | 1554 |
1555 __ Bind(deferred->exit()); | 1555 __ Bind(deferred->exit()); |
1556 | 1556 |
1557 if (instr->hydrogen()->MustPrefillWithFiller()) { | 1557 if (instr->hydrogen()->MustPrefillWithFiller()) { |
1558 Register filler_count = temp1; | 1558 Register start = temp1; |
1559 Register filler = temp2; | 1559 Register end = temp2; |
1560 Register untagged_result = ToRegister(instr->temp3()); | 1560 Register filler = ToRegister(instr->temp3()); |
| 1561 |
| 1562 __ Sub(start, result, kHeapObjectTag); |
1561 | 1563 |
1562 if (instr->size()->IsConstantOperand()) { | 1564 if (instr->size()->IsConstantOperand()) { |
1563 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 1565 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
1564 __ Mov(filler_count, size / kPointerSize); | 1566 __ Add(end, start, size); |
1565 } else { | 1567 } else { |
1566 __ Lsr(filler_count.W(), ToRegister32(instr->size()), kPointerSizeLog2); | 1568 __ Add(end, start, ToRegister(instr->size())); |
1567 } | 1569 } |
1568 | 1570 __ LoadRoot(filler, Heap::kOnePointerFillerMapRootIndex); |
1569 __ Sub(untagged_result, result, kHeapObjectTag); | 1571 __ InitializeFieldsWithFiller(start, end, filler); |
1570 __ Mov(filler, Operand(isolate()->factory()->one_pointer_filler_map())); | |
1571 __ FillFields(untagged_result, filler_count, filler); | |
1572 } else { | 1572 } else { |
1573 DCHECK(instr->temp3() == NULL); | 1573 DCHECK(instr->temp3() == NULL); |
1574 } | 1574 } |
1575 } | 1575 } |
1576 | 1576 |
1577 | 1577 |
1578 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { | 1578 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { |
1579 // TODO(3095996): Get rid of this. For now, we need to make the | 1579 // TODO(3095996): Get rid of this. For now, we need to make the |
1580 // result register contain a valid pointer because it is already | 1580 // result register contain a valid pointer because it is already |
1581 // contained in the register pointer map. | 1581 // contained in the register pointer map. |
(...skipping 4368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5950 Handle<ScopeInfo> scope_info = instr->scope_info(); | 5950 Handle<ScopeInfo> scope_info = instr->scope_info(); |
5951 __ Push(scope_info); | 5951 __ Push(scope_info); |
5952 __ Push(ToRegister(instr->function())); | 5952 __ Push(ToRegister(instr->function())); |
5953 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5953 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5954 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5954 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5955 } | 5955 } |
5956 | 5956 |
5957 | 5957 |
5958 } // namespace internal | 5958 } // namespace internal |
5959 } // namespace v8 | 5959 } // namespace v8 |
OLD | NEW |