summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2013-05-14 13:15:11 -0700
committerChristopher Ferris <cferris@google.com>2013-05-14 13:15:11 -0700
commita67e53c2345eac337d24e4decaf4733c5314aff8 (patch)
tree71ddd7273c773aefb9536f605717b65147890588 /tests
parentb6fbb93759b855dd9f96aa6fdf650d88491e2b40 (diff)
downloadextras-a67e53c2345eac337d24e4decaf4733c5314aff8.tar.gz
Add guards around neon code.
Missed the neon code in the copy bandwidths. Added guards and the functionality to indicate that these are neon based benchmarks. Change-Id: I350d984b27063c47b3c78fc1fa88d33fae960d78
Diffstat (limited to 'tests')
-rw-r--r--tests/memtest/bandwidth.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/memtest/bandwidth.h b/tests/memtest/bandwidth.h
index 414977b9..b890f809 100644
--- a/tests/memtest/bandwidth.h
+++ b/tests/memtest/bandwidth.h
@@ -264,9 +264,12 @@ public:
const char *getName() { return "vld/vst"; }
+ bool usesNeon() { return true; }
+
protected:
// Copy using vld/vst instructions.
void bench(size_t num_loops) {
+#if defined(__ARM_NEON__)
asm volatile(
"stmfd sp!, {r0,r1,r2,r3,r4}\n"
@@ -293,6 +296,7 @@ protected:
"ldmfd sp!, {r0,r1,r2,r3,r4}\n"
:: "r" (_src), "r" (_dst), "r" (_size), "r" (num_loops) : "r0", "r1", "r2", "r3");
+#endif
}
};
@@ -303,9 +307,12 @@ public:
const char *getName() { return "vldmia/vstmia"; }
+ bool usesNeon() { return true; }
+
protected:
// Copy using vld/vst instructions.
void bench(size_t num_loops) {
+#if defined(__ARM_NEON__)
asm volatile(
"stmfd sp!, {r0,r1,r2,r3,r4}\n"
@@ -330,6 +337,7 @@ protected:
"ldmfd sp!, {r0,r1,r2,r3,r4}\n"
:: "r" (_src), "r" (_dst), "r" (_size), "r" (num_loops) : "r0", "r1", "r2", "r3");
+#endif
}
};