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

Unified Diff: runtime/vm/intrinsifier_mips.cc

Issue 237063004: Intrinsify UserTag operations on all architectures (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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/intrinsifier_ia32.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_mips.cc
diff --git a/runtime/vm/intrinsifier_mips.cc b/runtime/vm/intrinsifier_mips.cc
index 14b3105fa82c74e8c6332fd6ee4c90c770af9133..677be1419a8a7503941863897efdfeeeea96e1de 100644
--- a/runtime/vm/intrinsifier_mips.cc
+++ b/runtime/vm/intrinsifier_mips.cc
@@ -1778,6 +1778,50 @@ void Intrinsifier::TwoByteString_equality(Assembler* assembler) {
StringEquality(assembler, kTwoByteStringCid);
}
+// On stack: user tag (+0).
+void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) {
+ // T1: Isolate.
+ Isolate* isolate = Isolate::Current();
+ __ LoadImmediate(T1, reinterpret_cast<uword>(isolate));
+ // V0: UserTag.
+ __ lw(V0, Address(SP, + 0 * kWordSize));
+ // Set Isolate::current_tag_.
+ __ sw(V0, Address(T1, Isolate::current_tag_offset()));
+ // V0: UserTag's tag.
+ __ lw(V0, FieldAddress(V0, UserTag::tag_offset()));
+ // Set Isolate::user_tag_.
+ __ sw(V0, Address(T1, Isolate::user_tag_offset()));
+ // Set return value.
+ __ Ret();
+ __ delay_slot()->LoadImmediate(V0, reinterpret_cast<int32_t>(Object::null()));
+}
+
+
+void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) {
+ // V0: Isolate.
+ Isolate* isolate = Isolate::Current();
+ __ LoadImmediate(V0, reinterpret_cast<uword>(isolate));
+ // Set return value.
+ __ Ret();
+ __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset()));
+}
+
+
+void Intrinsifier::Profiler_clearCurrentTag(Assembler* assembler) {
+ // T1: Isolate.
+ Isolate* isolate = Isolate::Current();
+ __ LoadImmediate(T1, reinterpret_cast<uword>(isolate));
+ // Set return value to Isolate::current_tag_.
+ __ lw(V0, Address(T1, Isolate::current_tag_offset()));
+ // Clear Isolate::current_tag_.
+ const int32_t raw_null = reinterpret_cast<int32_t>(UserTag::null());
+ __ LoadImmediate(T0, raw_null);
+ __ sw(T0, Address(T1, Isolate::current_tag_offset()));
+ // Clear Isolate::user_tag_.
+ __ Ret();
+ __ delay_slot()->sw(ZR, Address(T1, Isolate::user_tag_offset()));
+}
+
} // namespace dart
#endif // defined TARGET_ARCH_MIPS
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698