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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 if (Address::CanHoldOffset(offset - kHeapObjectTag)) { | 966 if (Address::CanHoldOffset(offset - kHeapObjectTag)) { |
967 StoreIntoObjectNoBarrier(object, FieldAddress(object, offset), value); | 967 StoreIntoObjectNoBarrier(object, FieldAddress(object, offset), value); |
968 } else { | 968 } else { |
969 AddImmediate(TMP, object, offset - kHeapObjectTag); | 969 AddImmediate(TMP, object, offset - kHeapObjectTag); |
970 StoreIntoObjectNoBarrier(object, Address(TMP), value); | 970 StoreIntoObjectNoBarrier(object, Address(TMP), value); |
971 } | 971 } |
972 } | 972 } |
973 | 973 |
974 | 974 |
975 void Assembler::LoadClassId(Register result, Register object) { | 975 void Assembler::LoadClassId(Register result, Register object) { |
976 ASSERT(RawObject::kClassIdTagPos == kBitsPerInt32); | 976 ASSERT(RawObject::kClassIdTagPos == 16); |
977 ASSERT(RawObject::kClassIdTagSize == kBitsPerInt32); | 977 ASSERT(RawObject::kClassIdTagSize == 16); |
978 const intptr_t class_id_offset = | 978 const intptr_t class_id_offset = |
979 Object::tags_offset() + RawObject::kClassIdTagPos / kBitsPerByte; | 979 Object::tags_offset() + RawObject::kClassIdTagPos / kBitsPerByte; |
980 LoadFromOffset(result, object, class_id_offset - kHeapObjectTag, | 980 LoadFromOffset(result, object, class_id_offset - kHeapObjectTag, |
981 kUnsignedWord); | 981 kUnsignedHalfword); |
982 } | 982 } |
983 | 983 |
984 | 984 |
985 void Assembler::LoadClassById(Register result, Register class_id) { | 985 void Assembler::LoadClassById(Register result, Register class_id) { |
986 ASSERT(result != class_id); | 986 ASSERT(result != class_id); |
987 LoadIsolate(result); | 987 LoadIsolate(result); |
988 const intptr_t offset = | 988 const intptr_t offset = |
989 Isolate::class_table_offset() + ClassTable::table_offset(); | 989 Isolate::class_table_offset() + ClassTable::table_offset(); |
990 LoadFromOffset(result, result, offset); | 990 LoadFromOffset(result, result, offset); |
991 ldr(result, Address(result, class_id, UXTX, Address::Scaled)); | 991 ldr(result, Address(result, class_id, UXTX, Address::Scaled)); |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1571 str(tmp, Address(addr, 7), kUnsignedByte); | 1571 str(tmp, Address(addr, 7), kUnsignedByte); |
1572 if (sz == kDoubleWord) { | 1572 if (sz == kDoubleWord) { |
1573 return; | 1573 return; |
1574 } | 1574 } |
1575 UNIMPLEMENTED(); | 1575 UNIMPLEMENTED(); |
1576 } | 1576 } |
1577 | 1577 |
1578 } // namespace dart | 1578 } // namespace dart |
1579 | 1579 |
1580 #endif // defined TARGET_ARCH_ARM64 | 1580 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |