Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(630)

Unified Diff: runtime/vm/stub_code_mips.cc

Issue 1226403003: Support per-thread zones and stack resources. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add thread_registry.h Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_mips.cc
diff --git a/runtime/vm/stub_code_mips.cc b/runtime/vm/stub_code_mips.cc
index eb53d7f16948a079069151e61baa949af43f655c..5dd9c030e5b0e10a474847483bf32486071bc66e 100644
--- a/runtime/vm/stub_code_mips.cc
+++ b/runtime/vm/stub_code_mips.cc
@@ -52,7 +52,7 @@ void StubCode::GenerateCallToRuntimeStub(Assembler* assembler) {
// Save exit frame information to enable stack walking as we are about
// to transition to Dart VM C++ code.
- __ sw(FP, Address(S6, Isolate::top_exit_frame_info_offset()));
+ __ sw(FP, Address(THR, Thread::top_exit_frame_info_offset()));
#if defined(DEBUG)
{ Label ok;
@@ -107,7 +107,7 @@ void StubCode::GenerateCallToRuntimeStub(Assembler* assembler) {
__ sw(A2, Address(S6, Isolate::vm_tag_offset()));
// Reset exit frame information in Isolate structure.
- __ sw(ZR, Address(S6, Isolate::top_exit_frame_info_offset()));
+ __ sw(ZR, Address(THR, Thread::top_exit_frame_info_offset()));
__ LeaveStubFrameAndReturn();
}
@@ -153,7 +153,7 @@ void StubCode::GenerateCallNativeCFunctionStub(Assembler* assembler) {
// Save exit frame information to enable stack walking as we are about
// to transition to native code.
- __ sw(FP, Address(S6, Isolate::top_exit_frame_info_offset()));
+ __ sw(FP, Address(THR, Thread::top_exit_frame_info_offset()));
#if defined(DEBUG)
{ Label ok;
@@ -216,7 +216,7 @@ void StubCode::GenerateCallNativeCFunctionStub(Assembler* assembler) {
__ sw(A2, Address(S6, Isolate::vm_tag_offset()));
// Reset exit frame information in Isolate structure.
- __ sw(ZR, Address(S6, Isolate::top_exit_frame_info_offset()));
+ __ sw(ZR, Address(THR, Thread::top_exit_frame_info_offset()));
__ LeaveStubFrameAndReturn();
}
@@ -243,7 +243,7 @@ void StubCode::GenerateCallBootstrapCFunctionStub(Assembler* assembler) {
// Save exit frame information to enable stack walking as we are about
// to transition to native code.
- __ sw(FP, Address(S6, Isolate::top_exit_frame_info_offset()));
+ __ sw(FP, Address(THR, Thread::top_exit_frame_info_offset()));
#if defined(DEBUG)
{ Label ok;
@@ -301,7 +301,7 @@ void StubCode::GenerateCallBootstrapCFunctionStub(Assembler* assembler) {
__ sw(A2, Address(S6, Isolate::vm_tag_offset()));
// Reset exit frame information in Isolate structure.
- __ sw(ZR, Address(S6, Isolate::top_exit_frame_info_offset()));
+ __ sw(ZR, Address(THR, Thread::top_exit_frame_info_offset()));
__ LeaveStubFrameAndReturn();
}
@@ -884,11 +884,11 @@ void StubCode::GenerateInvokeDartCodeStub(Assembler* assembler) {
// Save top resource and top exit frame info. Use T0 as a temporary register.
// StackFrameIterator reads the top exit frame info saved in this frame.
- __ lw(T0, Address(T2, Isolate::top_resource_offset()));
- __ sw(ZR, Address(T2, Isolate::top_resource_offset()));
+ __ lw(T0, Address(THR, Thread::top_resource_offset()));
+ __ sw(ZR, Address(THR, Thread::top_resource_offset()));
__ sw(T0, Address(SP, 1 * kWordSize));
- __ lw(T0, Address(T2, Isolate::top_exit_frame_info_offset()));
- __ sw(ZR, Address(T2, Isolate::top_exit_frame_info_offset()));
+ __ lw(T0, Address(THR, Thread::top_exit_frame_info_offset()));
+ __ sw(ZR, Address(THR, Thread::top_exit_frame_info_offset()));
// kExitLinkSlotFromEntryFp must be kept in sync with the code below.
ASSERT(kExitLinkSlotFromEntryFp == -23);
__ sw(T0, Address(SP, 0 * kWordSize));
@@ -940,9 +940,9 @@ void StubCode::GenerateInvokeDartCodeStub(Assembler* assembler) {
// Restore the saved top resource and top exit frame info back into the
// Isolate structure. Uses T0 as a temporary register for this.
__ lw(T0, Address(SP, 1 * kWordSize));
- __ sw(T0, Address(S6, Isolate::top_resource_offset()));
+ __ sw(T0, Address(THR, Thread::top_resource_offset()));
__ lw(T0, Address(SP, 0 * kWordSize));
- __ sw(T0, Address(S6, Isolate::top_exit_frame_info_offset()));
+ __ sw(T0, Address(THR, Thread::top_exit_frame_info_offset()));
// Restore C++ ABI callee-saved registers.
for (int i = S0; i <= S7; i++) {
@@ -2087,7 +2087,7 @@ void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
__ LoadImmediate(A2, VMTag::kDartTagId);
__ sw(A2, Address(A3, Isolate::vm_tag_offset()));
// Clear top exit frame.
- __ sw(ZR, Address(A3, Isolate::top_exit_frame_info_offset()));
+ __ sw(ZR, Address(THR, Thread::top_exit_frame_info_offset()));
__ jr(A0); // Jump to the exception handler code.
__ delay_slot()->mov(SP, A1); // Stack pointer.
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698