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

Unified Diff: runtime/vm/assembler_mips_test.cc

Issue 1156593002: Cache current thread in a reserved register and use it in LoadIsolate (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address review comments. Created 5 years, 7 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
Index: runtime/vm/assembler_mips_test.cc
diff --git a/runtime/vm/assembler_mips_test.cc b/runtime/vm/assembler_mips_test.cc
index d382503f3d1004f5735ad758223445db2c486398..a0a3a4187d16aee6a5f36f11036181f053c31f6c 100644
--- a/runtime/vm/assembler_mips_test.cc
+++ b/runtime/vm/assembler_mips_test.cc
@@ -2086,18 +2086,21 @@ ASSEMBLER_TEST_RUN(Cop1CvtSD, test) {
// A0: context.
// A1: value.
// A2: growable array.
+// A3: current thread.
ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) {
- __ addiu(SP, SP, Immediate(-2 * kWordSize));
+ __ addiu(SP, SP, Immediate(-3 * kWordSize));
+ __ sw(THR, Address(SP, 2 * kWordSize));
__ sw(CTX, Address(SP, 1 * kWordSize));
__ sw(RA, Address(SP, 0 * kWordSize));
-
__ mov(CTX, A0);
+ __ mov(THR, A3);
__ StoreIntoObject(A2,
FieldAddress(A2, GrowableObjectArray::data_offset()),
A1);
__ lw(RA, Address(SP, 0 * kWordSize));
__ lw(CTX, Address(SP, 1 * kWordSize));
- __ addiu(SP, SP, Immediate(2 * kWordSize));
+ __ lw(THR, Address(SP, 2 * kWordSize));
+ __ addiu(SP, SP, Immediate(3 * kWordSize));
__ Ret();
}

Powered by Google App Engine
This is Rietveld 408576698