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/code_generator.h" | 9 #include "vm/code_generator.h" |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1993 | 1993 |
1994 | 1994 |
1995 void StubCode::GenerateTwoArgsUnoptimizedStaticCallStub(Assembler* assembler) { | 1995 void StubCode::GenerateTwoArgsUnoptimizedStaticCallStub(Assembler* assembler) { |
1996 GenerateUsageCounterIncrement(assembler, T0); | 1996 GenerateUsageCounterIncrement(assembler, T0); |
1997 GenerateNArgsCheckInlineCacheStub( | 1997 GenerateNArgsCheckInlineCacheStub( |
1998 assembler, 2, kStaticCallMissHandlerTwoArgsRuntimeEntry); | 1998 assembler, 2, kStaticCallMissHandlerTwoArgsRuntimeEntry); |
1999 } | 1999 } |
2000 | 2000 |
2001 | 2001 |
2002 void StubCode::GenerateBreakpointRuntimeStub(Assembler* assembler) { | 2002 void StubCode::GenerateBreakpointRuntimeStub(Assembler* assembler) { |
2003 __ Unimplemented("BreakpointRuntime stub"); | 2003 __ Comment("BreakpointRuntime stub"); |
| 2004 __ EnterStubFrame(); |
| 2005 __ addiu(SP, SP, Immediate(-3 * kWordSize)); |
| 2006 __ sw(S5, Address(SP, 2 * kWordSize)); |
| 2007 __ sw(S4, Address(SP, 1 * kWordSize)); |
| 2008 __ LoadImmediate(TMP, reinterpret_cast<intptr_t>(Object::null())); |
| 2009 __ sw(TMP, Address(SP, 0 * kWordSize)); |
| 2010 |
| 2011 __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry, 0); |
| 2012 |
| 2013 __ lw(S5, Address(SP, 2 * kWordSize)); |
| 2014 __ lw(S4, Address(SP, 1 * kWordSize)); |
| 2015 __ lw(T0, Address(SP, 0 * kWordSize)); |
| 2016 __ addiu(SP, SP, Immediate(3 * kWordSize)); |
| 2017 __ LeaveStubFrame(); |
| 2018 __ jr(T0); |
2004 } | 2019 } |
2005 | 2020 |
2006 | 2021 |
2007 // RA: return address (Dart code). | 2022 // RA: return address (Dart code). |
2008 // S5: IC data (unoptimized static call). | 2023 // S5: IC data (unoptimized static call). |
2009 void StubCode::GenerateBreakpointStaticStub(Assembler* assembler) { | 2024 void StubCode::GenerateBreakpointStaticStub(Assembler* assembler) { |
2010 __ TraceSimMsg("BreakpointStaticStub"); | 2025 __ TraceSimMsg("BreakpointStaticStub"); |
2011 // Create a stub frame as we are pushing some objects on the stack before | 2026 // Create a stub frame as we are pushing some objects on the stack before |
2012 // calling into the runtime. | 2027 // calling into the runtime. |
2013 __ EnterStubFrame(); | 2028 __ EnterStubFrame(); |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2491 __ lw(left, Address(SP, 1 * kWordSize)); | 2506 __ lw(left, Address(SP, 1 * kWordSize)); |
2492 __ lw(temp2, Address(SP, 2 * kWordSize)); | 2507 __ lw(temp2, Address(SP, 2 * kWordSize)); |
2493 __ lw(temp1, Address(SP, 3 * kWordSize)); | 2508 __ lw(temp1, Address(SP, 3 * kWordSize)); |
2494 __ Ret(); | 2509 __ Ret(); |
2495 __ delay_slot()->addiu(SP, SP, Immediate(4 * kWordSize)); | 2510 __ delay_slot()->addiu(SP, SP, Immediate(4 * kWordSize)); |
2496 } | 2511 } |
2497 | 2512 |
2498 } // namespace dart | 2513 } // namespace dart |
2499 | 2514 |
2500 #endif // defined TARGET_ARCH_MIPS | 2515 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |