On 5/4/23 21:39, Taylor Simpson wrote:
This will facilitate adding additional tests in separate .c files

Signed-off-by: Taylor Simpson <tsimp...@quicinc.com>
---
  tests/tcg/hexagon/hvx_misc.h      | 178 ++++++++++++++++++++++++++++++
  tests/tcg/hexagon/hvx_misc.c      | 160 +--------------------------
  tests/tcg/hexagon/Makefile.target |   1 +
  3 files changed, 181 insertions(+), 158 deletions(-)
  create mode 100644 tests/tcg/hexagon/hvx_misc.h

diff --git a/tests/tcg/hexagon/hvx_misc.h b/tests/tcg/hexagon/hvx_misc.h
new file mode 100644
index 0000000000..ebcdb9f033
--- /dev/null
+++ b/tests/tcg/hexagon/hvx_misc.h


+static void init_buffers(void)

inline?

+{
+    int counter0 = 0;
+    int counter1 = 17;
+    for (int i = 0; i < BUFSIZE; i++) {
+        for (int j = 0; j < MAX_VEC_SIZE_BYTES; j++) {
+            buffer0[i].b[j] = counter0++;
+            buffer1[i].b[j] = counter1++;
+        }
+        for (int j = 0; j < MAX_VEC_SIZE_BYTES / 4; j++) {
+            mask[i].w[j] = (i + j % MASKMOD == 0) ? 0 : 1;
+        }
+    }
+}


Reply via email to