| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // NOLINT | 5 #include "vm/globals.h" // NOLINT |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/longjump.h" | 10 #include "vm/longjump.h" |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 LoadWordFromPoolOffset(dst, pp, offset); | 464 LoadWordFromPoolOffset(dst, pp, offset); |
| 465 } else { | 465 } else { |
| 466 ASSERT((Isolate::Current() == Dart::vm_isolate()) || | 466 ASSERT((Isolate::Current() == Dart::vm_isolate()) || |
| 467 object.IsSmi() || | 467 object.IsSmi() || |
| 468 object.InVMHeap()); | 468 object.InVMHeap()); |
| 469 LoadDecodableImmediate(dst, reinterpret_cast<int64_t>(object.raw()), pp); | 469 LoadDecodableImmediate(dst, reinterpret_cast<int64_t>(object.raw()), pp); |
| 470 } | 470 } |
| 471 } | 471 } |
| 472 | 472 |
| 473 | 473 |
| 474 void Assembler::LoadUniqueObject(Register dst, |
| 475 const Object& object, |
| 476 Register pp) { |
| 477 if (CanLoadObjectFromPool(object)) { |
| 478 const int32_t offset = |
| 479 ObjectPool::element_offset(object_pool_wrapper_.AddObject(object)); |
| 480 LoadWordFromPoolOffset(dst, pp, offset); |
| 481 } else { |
| 482 ASSERT((Isolate::Current() == Dart::vm_isolate()) || |
| 483 object.IsSmi() || |
| 484 object.InVMHeap()); |
| 485 LoadDecodableImmediate(dst, reinterpret_cast<int64_t>(object.raw()), pp); |
| 486 } |
| 487 } |
| 488 |
| 489 |
| 474 void Assembler::CompareObject(Register reg, const Object& object, Register pp) { | 490 void Assembler::CompareObject(Register reg, const Object& object, Register pp) { |
| 475 if (CanLoadObjectFromPool(object)) { | 491 if (CanLoadObjectFromPool(object)) { |
| 476 LoadObject(TMP, object, pp); | 492 LoadObject(TMP, object, pp); |
| 477 CompareRegisters(reg, TMP); | 493 CompareRegisters(reg, TMP); |
| 478 } else { | 494 } else { |
| 479 CompareImmediate(reg, reinterpret_cast<int64_t>(object.raw()), pp); | 495 CompareImmediate(reg, reinterpret_cast<int64_t>(object.raw()), pp); |
| 480 } | 496 } |
| 481 } | 497 } |
| 482 | 498 |
| 483 | 499 |
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1457 add(base, array, Operand(index, LSL, shift)); | 1473 add(base, array, Operand(index, LSL, shift)); |
| 1458 } | 1474 } |
| 1459 const OperandSize size = Address::OperandSizeFor(cid); | 1475 const OperandSize size = Address::OperandSizeFor(cid); |
| 1460 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size)); | 1476 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size)); |
| 1461 return Address(base, offset, Address::Offset, size); | 1477 return Address(base, offset, Address::Offset, size); |
| 1462 } | 1478 } |
| 1463 | 1479 |
| 1464 } // namespace dart | 1480 } // namespace dart |
| 1465 | 1481 |
| 1466 #endif // defined TARGET_ARCH_ARM64 | 1482 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |