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

Unified Diff: runtime/vm/assembler_mips_test.cc

Issue 1722013002: Enable concurrent sweep on MIPS and ARM64. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: clrex and assembler tests Created 4 years, 10 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/assembler_mips.h ('k') | runtime/vm/constants_arm64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_mips_test.cc
diff --git a/runtime/vm/assembler_mips_test.cc b/runtime/vm/assembler_mips_test.cc
index f23fe934b18be4775e93f875d0cf481f75ec0af6..e3cad3d6a91c1266688f625e4c81cce0588d144c 100644
--- a/runtime/vm/assembler_mips_test.cc
+++ b/runtime/vm/assembler_mips_test.cc
@@ -2169,6 +2169,30 @@ ASSEMBLER_TEST_RUN(ComputeRange, test) {
}
+ASSEMBLER_TEST_GENERATE(Semaphore, assembler) {
+ __ EnterFrame();
+ __ LoadImmediate(T0, 40);
+ __ LoadImmediate(T1, 42);
+ __ Push(T0);
+ Label retry;
+ __ Bind(&retry);
+ __ ll(T0, Address(SP));
+ __ mov(T2, T1);
+ __ sc(T2, Address(SP)); // T1 == 1, success
+ __ LoadImmediate(T3, 1);
+ __ bne(T2, T3, &retry); // NE if context switch occurred between ll and sc
+ __ Pop(V0); // 42
+ __ LeaveFrameAndReturn();
+}
+
+
+ASSEMBLER_TEST_RUN(Semaphore, test) {
+ EXPECT(test != NULL);
+ typedef int (*Semaphore)() DART_UNUSED;
+ EXPECT_EQ(42, EXECUTE_TEST_CODE_INT32(Semaphore, test->entry()));
+}
+
+
} // namespace dart
#endif // defined TARGET_ARCH_MIPS
« no previous file with comments | « runtime/vm/assembler_mips.h ('k') | runtime/vm/constants_arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698