summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-05-14 15:02:31 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-05-14 15:02:31 -0700
commita885c1bd06d0472822314e738815cbd2d3247988 (patch)
tree6c86c205d8633df49f4dba6ab595cfd21c57b763
parentba87304f256880aee4e584e7e1a811ce0cef1a68 (diff)
parent69294b5bf79dd0f0909ed8831fbac0f3ab5bf1e5 (diff)
downloadextras-a885c1bd06d0472822314e738815cbd2d3247988.tar.gz
am 69294b5b: Merge "Add guards around neon code."
* commit '69294b5bf79dd0f0909ed8831fbac0f3ab5bf1e5': Add guards around neon code.
-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
}
};