| 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 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1237 LeaveDartFrame(); | 1237 LeaveDartFrame(); |
| 1238 } | 1238 } |
| 1239 | 1239 |
| 1240 | 1240 |
| 1241 void Assembler::NoMonomorphicCheckedEntry() { | 1241 void Assembler::NoMonomorphicCheckedEntry() { |
| 1242 buffer_.Reset(); | 1242 buffer_.Reset(); |
| 1243 brk(0); | 1243 brk(0); |
| 1244 brk(0); | 1244 brk(0); |
| 1245 brk(0); | 1245 brk(0); |
| 1246 brk(0); | 1246 brk(0); |
| 1247 brk(0); | |
| 1248 brk(0); | |
| 1249 ASSERT(CodeSize() == Instructions::kCheckedEntryOffset); | 1247 ASSERT(CodeSize() == Instructions::kCheckedEntryOffset); |
| 1250 } | 1248 } |
| 1251 | 1249 |
| 1252 | 1250 |
| 1253 // R0 receiver, R5 guarded cid as Smi | 1251 // R0 receiver, R5 guarded cid as Smi |
| 1254 void Assembler::MonomorphicCheckedEntry() { | 1252 void Assembler::MonomorphicCheckedEntry() { |
| 1255 bool saved_use_far_branches = use_far_branches(); | 1253 bool saved_use_far_branches = use_far_branches(); |
| 1256 set_use_far_branches(false); | 1254 set_use_far_branches(false); |
| 1257 | 1255 |
| 1258 Label immediate, have_cid, miss; | 1256 Label immediate, have_cid, miss; |
| 1259 Bind(&miss); | 1257 Bind(&miss); |
| 1260 ldr(CODE_REG, Address(THR, Thread::monomorphic_miss_stub_offset())); | 1258 ldr(IP0, Address(THR, Thread::monomorphic_miss_entry_offset())); |
| 1261 ldr(IP0, FieldAddress(CODE_REG, Code::entry_point_offset())); | |
| 1262 br(IP0); | 1259 br(IP0); |
| 1263 brk(0); | |
| 1264 | 1260 |
| 1265 Bind(&immediate); | 1261 Bind(&immediate); |
| 1266 movz(R4, Immediate(kSmiCid), 0); | 1262 movz(R4, Immediate(kSmiCid), 0); |
| 1267 b(&have_cid); | 1263 b(&have_cid); |
| 1268 | 1264 |
| 1269 Comment("MonomorphicCheckedEntry"); | 1265 Comment("MonomorphicCheckedEntry"); |
| 1270 ASSERT(CodeSize() == Instructions::kCheckedEntryOffset); | 1266 ASSERT(CodeSize() == Instructions::kCheckedEntryOffset); |
| 1271 tsti(R0, Immediate(kSmiTagMask)); | 1267 tsti(R0, Immediate(kSmiTagMask)); |
| 1272 SmiUntag(R5); | 1268 SmiUntag(R5); |
| 1273 b(&immediate, EQ); | 1269 b(&immediate, EQ); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1470 add(base, array, Operand(index, LSL, shift)); | 1466 add(base, array, Operand(index, LSL, shift)); |
| 1471 } | 1467 } |
| 1472 const OperandSize size = Address::OperandSizeFor(cid); | 1468 const OperandSize size = Address::OperandSizeFor(cid); |
| 1473 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size)); | 1469 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size)); |
| 1474 return Address(base, offset, Address::Offset, size); | 1470 return Address(base, offset, Address::Offset, size); |
| 1475 } | 1471 } |
| 1476 | 1472 |
| 1477 } // namespace dart | 1473 } // namespace dart |
| 1478 | 1474 |
| 1479 #endif // defined TARGET_ARCH_ARM64 | 1475 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |