|
| From: | Philippe Mathieu-Daudé |
| Subject: | Re: [PATCH] Hexagon (tests/tcg/hexagon) Move HVX test infra to header file |
| Date: | Thu, 6 Apr 2023 09:24:10 +0200 |
| User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 |
On 5/4/23 21:39, Taylor Simpson wrote:
This will facilitate adding additional tests in separate .c files Signed-off-by: Taylor Simpson <tsimpson@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;
+ }
+ }
+}
| [Prev in Thread] | Current Thread | [Next in Thread] |