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

Unified Diff: crosstest/test_sync_atomic_main.cpp

Issue 1369333003: Subzero. Enable Atomics in ARM. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments; make format; git pull; merge. Created 5 years, 2 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 | « Makefile.standalone ('k') | src/IceTargetLoweringARM32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crosstest/test_sync_atomic_main.cpp
diff --git a/crosstest/test_sync_atomic_main.cpp b/crosstest/test_sync_atomic_main.cpp
index f935e0a03184051889c287b84d8cb86ea23a6a26..37b6b40bb5ab39d36b53afb6b7e790935eecedb2 100644
--- a/crosstest/test_sync_atomic_main.cpp
+++ b/crosstest/test_sync_atomic_main.cpp
@@ -92,7 +92,8 @@ void testAtomicRMW(volatile Type *AtomicLoc, size_t &TotalTests, size_t &Passes,
} else {
++Failures;
std::cout << "test_" << Funcs[f].Name << (CHAR_BIT * sizeof(Type))
- << "(" << static_cast<uint64>(Value1) << ", "
+ << "(" << fetch_first << ", "
+ << static_cast<uint64>(Value1) << ", "
<< static_cast<uint64>(Value2)
<< "): sz1=" << static_cast<uint64>(ResultSz1)
<< " llc1=" << static_cast<uint64>(ResultLlc1)
@@ -139,7 +140,7 @@ void testValCompareAndSwap(volatile Type *AtomicLoc, size_t &TotalTests,
++Failures;
std::cout << "test_" << Funcs[f].Name << (CHAR_BIT * sizeof(Type))
<< "(" << static_cast<uint64>(Value1) << ", "
- << static_cast<uint64>(Value2)
+ << static_cast<uint64>(Value2) << ", flip=" << flip
<< "): sz1=" << static_cast<uint64>(ResultSz1)
<< " llc1=" << static_cast<uint64>(ResultLlc1)
<< " sz2=" << static_cast<uint64>(ResultSz2)
@@ -159,7 +160,15 @@ template <typename Type> struct ThreadData {
};
template <typename Type> void *threadWrapper(void *Data) {
- const size_t NumReps = 8000;
+#ifdef ARM32
+ // Given that most of times these crosstests for ARM are run under qemu, we
+ // set a lower NumReps to allow crosstests to complete within a reasonable
+ // amount of time.
+ static const size_t NumReps = 1000;
+#else // ARM32
+ static const size_t NumReps = 8000;
+#endif // ARM32
+
ThreadData<Type> *TData = reinterpret_cast<ThreadData<Type> *>(Data);
for (size_t i = 0; i < NumReps; ++i) {
(void)TData->FuncPtr(TData->Fetch, TData->Ptr, TData->Adjustment);
« no previous file with comments | « Makefile.standalone ('k') | src/IceTargetLoweringARM32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698