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

Unified Diff: runtime/vm/intrinsifier_arm.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.cc ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_arm.cc
diff --git a/runtime/vm/intrinsifier_arm.cc b/runtime/vm/intrinsifier_arm.cc
index 1b29a2b4e1bbd5106fdceaec17a0045227f8121a..84ef39bb03e1ce0d7c797a99eec9137a2590fd03 100644
--- a/runtime/vm/intrinsifier_arm.cc
+++ b/runtime/vm/intrinsifier_arm.cc
@@ -1707,6 +1707,52 @@ void Intrinsifier::TwoByteString_equality(Assembler* assembler) {
}
+// On stack: user tag (+0).
+void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) {
+ // R1: Isolate.
+ Isolate* isolate = Isolate::Current();
+ __ LoadImmediate(R1, reinterpret_cast<uword>(isolate));
+ // R0: UserTag.
+ __ ldr(R0, Address(SP, + 0 * kWordSize));
+ // Set Isolate::current_tag_.
+ __ str(R0, Address(R1, Isolate::current_tag_offset()));
+ // R0: UserTag's tag.
+ __ ldr(R0, FieldAddress(R0, UserTag::tag_offset()));
+ // Set Isolate::user_tag_.
+ __ str(R0, Address(R1, Isolate::user_tag_offset()));
+ // Set return value.
+ const int32_t raw_null = reinterpret_cast<int32_t>(Object::null());
+ __ LoadImmediate(R0, raw_null);
+ __ Ret();
+}
+
+
+void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) {
+ // R1: Isolate.
+ Isolate* isolate = Isolate::Current();
+ __ LoadImmediate(R1, reinterpret_cast<uword>(isolate));
+ // Set return value to Isolate::current_tag_.
+ __ ldr(R0, Address(R1, Isolate::current_tag_offset()));
+ __ Ret();
+}
+
+
+void Intrinsifier::Profiler_clearCurrentTag(Assembler* assembler) {
+ // R1: Isolate.
+ Isolate* isolate = Isolate::Current();
+ __ LoadImmediate(R1, reinterpret_cast<uword>(isolate));
+ // Set return value to Isolate::current_tag_.
+ __ ldr(R0, Address(R1, Isolate::current_tag_offset()));
+ // Clear Isolate::current_tag_.
+ const int32_t raw_null = reinterpret_cast<int32_t>(UserTag::null());
+ __ LoadImmediate(R2, raw_null);
+ __ str(R2, Address(R1, Isolate::current_tag_offset()));
+ // Clear Isolate::user_tag_.
+ __ eor(R2, R2, ShifterOperand(R2));
+ __ str(R2, Address(R1, Isolate::user_tag_offset()));
+ __ Ret();
+}
+
} // namespace dart
#endif // defined TARGET_ARCH_ARM
« no previous file with comments | « runtime/vm/intrinsifier.cc ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698