OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/runtime_entry.h" | 9 #include "vm/runtime_entry.h" |
10 #include "vm/simulator.h" | 10 #include "vm/simulator.h" |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 const intptr_t offset = CodeSize(); | 380 const intptr_t offset = CodeSize(); |
381 | 381 |
382 addiu(SP, SP, Immediate(-4 * kWordSize)); | 382 addiu(SP, SP, Immediate(-4 * kWordSize)); |
383 sw(RA, Address(SP, 2 * kWordSize)); | 383 sw(RA, Address(SP, 2 * kWordSize)); |
384 sw(FP, Address(SP, 1 * kWordSize)); | 384 sw(FP, Address(SP, 1 * kWordSize)); |
385 sw(PP, Address(SP, 0 * kWordSize)); | 385 sw(PP, Address(SP, 0 * kWordSize)); |
386 | 386 |
387 Label next; | 387 Label next; |
388 // Branch and link to the instruction after the delay slot to get the PC. | 388 // Branch and link to the instruction after the delay slot to get the PC. |
389 bal(&next); | 389 bal(&next); |
390 | |
391 // RA is the address of the sw instruction below. Save it in T0. | 390 // RA is the address of the sw instruction below. Save it in T0. |
392 delay_slot()->mov(T0, RA); | 391 delay_slot()->mov(T0, RA); |
393 | 392 |
394 // Calculate the offset of the pool pointer from the PC. | 393 // Calculate the offset of the pool pointer from the PC. |
395 const intptr_t object_pool_pc_dist = | 394 const intptr_t object_pool_pc_dist = |
396 Instructions::HeaderSize() - Instructions::object_pool_offset() + | 395 Instructions::HeaderSize() - Instructions::object_pool_offset() + |
397 CodeSize(); | 396 CodeSize(); |
398 | 397 |
399 // This sw instruction is the return address for the bal, so T0 holds | 398 // This sw instruction is the return address for the bal, so T0 holds |
400 // the PC at this sw instruction. | 399 // the PC at this sw instruction. |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 Emit(reinterpret_cast<int32_t>(message)); | 557 Emit(reinterpret_cast<int32_t>(message)); |
559 Bind(&msg); | 558 Bind(&msg); |
560 break_(Instr::kMsgMessageCode); | 559 break_(Instr::kMsgMessageCode); |
561 } | 560 } |
562 } | 561 } |
563 | 562 |
564 } // namespace dart | 563 } // namespace dart |
565 | 564 |
566 #endif // defined TARGET_ARCH_MIPS | 565 #endif // defined TARGET_ARCH_MIPS |
567 | 566 |
OLD | NEW |