| 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 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 | 1070 |
| 1071 | 1071 |
| 1072 void Assembler::RestoreCodePointer() { | 1072 void Assembler::RestoreCodePointer() { |
| 1073 ldr(CODE_REG, Address(FP, kPcMarkerSlotFromFp * kWordSize)); | 1073 ldr(CODE_REG, Address(FP, kPcMarkerSlotFromFp * kWordSize)); |
| 1074 CheckCodePointer(); | 1074 CheckCodePointer(); |
| 1075 } | 1075 } |
| 1076 | 1076 |
| 1077 | 1077 |
| 1078 void Assembler::CheckCodePointer() { | 1078 void Assembler::CheckCodePointer() { |
| 1079 #ifdef DEBUG | 1079 #ifdef DEBUG |
| 1080 Comment("CheckCodePointer"); |
| 1080 Label cid_ok, instructions_ok; | 1081 Label cid_ok, instructions_ok; |
| 1081 Push(R0); | 1082 Push(R0); |
| 1082 CompareClassId(CODE_REG, kCodeCid); | 1083 CompareClassId(CODE_REG, kCodeCid); |
| 1083 b(&cid_ok, EQ); | 1084 b(&cid_ok, EQ); |
| 1084 brk(0); | 1085 brk(0); |
| 1085 Bind(&cid_ok); | 1086 Bind(&cid_ok); |
| 1086 | 1087 |
| 1087 const intptr_t entry_offset = | 1088 const intptr_t entry_offset = |
| 1088 CodeSize() + Instructions::HeaderSize() - kHeapObjectTag; | 1089 CodeSize() + Instructions::HeaderSize() - kHeapObjectTag; |
| 1089 adr(R0, Immediate(-entry_offset)); | 1090 adr(R0, Immediate(-entry_offset)); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1156 set_constant_pool_allowed(false); | 1157 set_constant_pool_allowed(false); |
| 1157 // Restore and untag PP. | 1158 // Restore and untag PP. |
| 1158 LoadFromOffset(PP, FP, kSavedCallerPpSlotFromFp * kWordSize); | 1159 LoadFromOffset(PP, FP, kSavedCallerPpSlotFromFp * kWordSize); |
| 1159 sub(PP, PP, Operand(kHeapObjectTag)); | 1160 sub(PP, PP, Operand(kHeapObjectTag)); |
| 1160 } | 1161 } |
| 1161 LeaveFrame(); | 1162 LeaveFrame(); |
| 1162 } | 1163 } |
| 1163 | 1164 |
| 1164 | 1165 |
| 1165 void Assembler::EnterCallRuntimeFrame(intptr_t frame_size) { | 1166 void Assembler::EnterCallRuntimeFrame(intptr_t frame_size) { |
| 1167 Comment("EnterCallRuntimeFrame"); |
| 1166 EnterStubFrame(); | 1168 EnterStubFrame(); |
| 1167 | 1169 |
| 1168 // Store fpu registers with the lowest register number at the lowest | 1170 // Store fpu registers with the lowest register number at the lowest |
| 1169 // address. | 1171 // address. |
| 1170 for (int i = kNumberOfVRegisters - 1; i >= 0; i--) { | 1172 for (int i = kNumberOfVRegisters - 1; i >= 0; i--) { |
| 1171 if ((i >= kAbiFirstPreservedFpuReg) && (i <= kAbiLastPreservedFpuReg)) { | 1173 if ((i >= kAbiFirstPreservedFpuReg) && (i <= kAbiLastPreservedFpuReg)) { |
| 1172 // TODO(zra): When SIMD is added, we must also preserve the top | 1174 // TODO(zra): When SIMD is added, we must also preserve the top |
| 1173 // 64-bits of the callee-saved registers. | 1175 // 64-bits of the callee-saved registers. |
| 1174 continue; | 1176 continue; |
| 1175 } | 1177 } |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1461 add(base, array, Operand(index, LSL, shift)); | 1463 add(base, array, Operand(index, LSL, shift)); |
| 1462 } | 1464 } |
| 1463 const OperandSize size = Address::OperandSizeFor(cid); | 1465 const OperandSize size = Address::OperandSizeFor(cid); |
| 1464 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size)); | 1466 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size)); |
| 1465 return Address(base, offset, Address::Offset, size); | 1467 return Address(base, offset, Address::Offset, size); |
| 1466 } | 1468 } |
| 1467 | 1469 |
| 1468 } // namespace dart | 1470 } // namespace dart |
| 1469 | 1471 |
| 1470 #endif // defined TARGET_ARCH_ARM64 | 1472 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |