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 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
978 if (Address::CanHoldOffset(offset - kHeapObjectTag)) { | 978 if (Address::CanHoldOffset(offset - kHeapObjectTag)) { |
979 StoreIntoObjectNoBarrier(object, FieldAddress(object, offset), value); | 979 StoreIntoObjectNoBarrier(object, FieldAddress(object, offset), value); |
980 } else { | 980 } else { |
981 AddImmediate(TMP, object, offset - kHeapObjectTag, pp); | 981 AddImmediate(TMP, object, offset - kHeapObjectTag, pp); |
982 StoreIntoObjectNoBarrier(object, Address(TMP), value); | 982 StoreIntoObjectNoBarrier(object, Address(TMP), value); |
983 } | 983 } |
984 } | 984 } |
985 | 985 |
986 | 986 |
987 void Assembler::LoadClassId(Register result, Register object, Register pp) { | 987 void Assembler::LoadClassId(Register result, Register object, Register pp) { |
988 ASSERT(RawObject::kClassIdTagPos == 16); | 988 ASSERT(RawObject::kClassIdTagPos == 32); |
989 ASSERT(RawObject::kClassIdTagSize == 16); | 989 ASSERT(RawObject::kClassIdTagSize == 32); |
siva
2015/06/12 22:08:11
Use kBitsPerInt32 instead of 32.
and in the place
rmacnak
2015/06/12 23:27:22
Done.
| |
990 const intptr_t class_id_offset = Object::tags_offset() + | 990 const intptr_t class_id_offset = Object::tags_offset() + |
991 RawObject::kClassIdTagPos / kBitsPerByte; | 991 RawObject::kClassIdTagPos / kBitsPerByte; |
992 LoadFromOffset(result, object, class_id_offset - kHeapObjectTag, pp, | 992 LoadFromOffset(result, object, class_id_offset - kHeapObjectTag, pp, |
993 kUnsignedHalfword); | 993 kUnsignedWord); |
994 } | 994 } |
995 | 995 |
996 | 996 |
997 void Assembler::LoadClassById(Register result, Register class_id, Register pp) { | 997 void Assembler::LoadClassById(Register result, Register class_id, Register pp) { |
998 ASSERT(result != class_id); | 998 ASSERT(result != class_id); |
999 LoadImmediate(result, Isolate::Current()->class_table()->TableAddress(), pp); | 999 LoadImmediate(result, Isolate::Current()->class_table()->TableAddress(), pp); |
1000 LoadFromOffset(result, result, 0, pp); | 1000 LoadFromOffset(result, result, 0, pp); |
1001 ldr(result, Address(result, class_id, UXTX, Address::Scaled)); | 1001 ldr(result, Address(result, class_id, UXTX, Address::Scaled)); |
1002 } | 1002 } |
1003 | 1003 |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1461 add(base, array, Operand(index, LSL, shift)); | 1461 add(base, array, Operand(index, LSL, shift)); |
1462 } | 1462 } |
1463 const OperandSize size = Address::OperandSizeFor(cid); | 1463 const OperandSize size = Address::OperandSizeFor(cid); |
1464 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size)); | 1464 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size)); |
1465 return Address(base, offset, Address::Offset, size); | 1465 return Address(base, offset, Address::Offset, size); |
1466 } | 1466 } |
1467 | 1467 |
1468 } // namespace dart | 1468 } // namespace dart |
1469 | 1469 |
1470 #endif // defined TARGET_ARCH_ARM64 | 1470 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |