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

Unified Diff: test/cctest/test-disasm-arm.cc

Issue 2318553002: [arm] Implement barriers on ARMv6 using CP15. (Closed)
Patch Set: Created 4 years, 3 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 | « src/arm/simulator-arm.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-disasm-arm.cc
diff --git a/test/cctest/test-disasm-arm.cc b/test/cctest/test-disasm-arm.cc
index d5f594962c1822846a1a2fb1de07016f5bfa2963..ee5c86a4103bb77791f064df3117ee4a4c6c4c9f 100644
--- a/test/cctest/test-disasm-arm.cc
+++ b/test/cctest/test-disasm-arm.cc
@@ -1165,10 +1165,33 @@ TEST(Barrier) {
COMPARE(dsb(ISH),
"f57ff04b dsb ish");
- COMPARE(isb(ISH),
- "f57ff06b isb ish");
+ COMPARE(isb(SY),
+ "f57ff06f isb sy");
+ } else {
+ // ARMv6 uses CP15 to implement barriers. The BarrierOption argument is
+ // ignored.
+ COMPARE(dmb(ISH),
+ "ee070fba mcr (CP15DMB)");
+ COMPARE(dsb(OSH),
+ "ee070f9a mcr (CP15DSB)");
+ COMPARE(isb(SY),
+ "ee070f95 mcr (CP15ISB)");
}
+ // ARMv6 barriers.
+ // Details available in ARM DDI 0406C.b, B3-1750.
+ COMPARE(mcr(p15, 0, r0, cr7, cr10, 5), "ee070fba mcr (CP15DMB)");
+ COMPARE(mcr(p15, 0, r0, cr7, cr10, 4), "ee070f9a mcr (CP15DSB)");
+ COMPARE(mcr(p15, 0, r0, cr7, cr5, 4), "ee070f95 mcr (CP15ISB)");
+ // Rt is ignored.
+ COMPARE(mcr(p15, 0, lr, cr7, cr10, 5), "ee07efba mcr (CP15DMB)");
+ COMPARE(mcr(p15, 0, lr, cr7, cr10, 4), "ee07ef9a mcr (CP15DSB)");
+ COMPARE(mcr(p15, 0, lr, cr7, cr5, 4), "ee07ef95 mcr (CP15ISB)");
+ // The mcr instruction can be conditional.
+ COMPARE(mcr(p15, 0, r0, cr7, cr10, 5, eq), "0e070fba mcreq (CP15DMB)");
+ COMPARE(mcr(p15, 0, r0, cr7, cr10, 4, ne), "1e070f9a mcrne (CP15DSB)");
+ COMPARE(mcr(p15, 0, r0, cr7, cr5, 4, mi), "4e070f95 mcrmi (CP15ISB)");
+
VERIFY_RUN();
}
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698