1. seandroid
  2. Untitled project
  3. system/extras

Commits

Christopher Ferris  committed c2d2bd3

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.

(cherry-pick of a67e53c2345eac337d24e4decaf4733c5314aff8.)

Change-Id: If0fae051c47979eb243681a3c994222cefaae826

  • Participants
  • Parent commits 10057e4
  • Branches master

Comments (0)

Files changed (1)

File tests/memtest/bandwidth.h

View file
  • Ignore whitespace
 
     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"
 
 
             "ldmfd sp!, {r0,r1,r2,r3,r4}\n"
         :: "r" (_src), "r" (_dst), "r" (_size), "r" (num_loops) : "r0", "r1", "r2", "r3");
+#endif
     }
 };
 
 
     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"
 
 
             "ldmfd sp!, {r0,r1,r2,r3,r4}\n"
         :: "r" (_src), "r" (_dst), "r" (_size), "r" (num_loops) : "r0", "r1", "r2", "r3");
+#endif
     }
 };