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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1418 void MacroAssembler::LoadTrueFalseRoots(Register true_root, | 1418 void MacroAssembler::LoadTrueFalseRoots(Register true_root, |
1419 Register false_root) { | 1419 Register false_root) { |
1420 STATIC_ASSERT((Heap::kTrueValueRootIndex + 1) == Heap::kFalseValueRootIndex); | 1420 STATIC_ASSERT((Heap::kTrueValueRootIndex + 1) == Heap::kFalseValueRootIndex); |
1421 Ldp(true_root, false_root, | 1421 Ldp(true_root, false_root, |
1422 MemOperand(root, Heap::kTrueValueRootIndex << kPointerSizeLog2)); | 1422 MemOperand(root, Heap::kTrueValueRootIndex << kPointerSizeLog2)); |
1423 } | 1423 } |
1424 | 1424 |
1425 | 1425 |
1426 void MacroAssembler::LoadHeapObject(Register result, | 1426 void MacroAssembler::LoadHeapObject(Register result, |
1427 Handle<HeapObject> object) { | 1427 Handle<HeapObject> object) { |
1428 AllowDeferredHandleDereference using_raw_address; | 1428 Mov(result, Operand(object)); |
1429 if (isolate()->heap()->InNewSpace(*object)) { | |
1430 Handle<Cell> cell = isolate()->factory()->NewCell(object); | |
1431 Mov(result, Operand(cell)); | |
1432 Ldr(result, FieldMemOperand(result, Cell::kValueOffset)); | |
1433 } else { | |
1434 Mov(result, Operand(object)); | |
1435 } | |
1436 } | 1429 } |
1437 | 1430 |
1438 | 1431 |
1439 void MacroAssembler::LoadInstanceDescriptors(Register map, | 1432 void MacroAssembler::LoadInstanceDescriptors(Register map, |
1440 Register descriptors) { | 1433 Register descriptors) { |
1441 Ldr(descriptors, FieldMemOperand(map, Map::kDescriptorsOffset)); | 1434 Ldr(descriptors, FieldMemOperand(map, Map::kDescriptorsOffset)); |
1442 } | 1435 } |
1443 | 1436 |
1444 | 1437 |
1445 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { | 1438 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { |
(...skipping 3698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5144 } | 5137 } |
5145 | 5138 |
5146 | 5139 |
5147 #undef __ | 5140 #undef __ |
5148 | 5141 |
5149 | 5142 |
5150 } // namespace internal | 5143 } // namespace internal |
5151 } // namespace v8 | 5144 } // namespace v8 |
5152 | 5145 |
5153 #endif // V8_TARGET_ARCH_ARM64 | 5146 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |