1 #define FNNAME1(NAME) exec_ ## NAME
2 #define FNNAME(NAME) FNNAME1(NAME)
4 void FNNAME (INSN_NAME) (void)
6 /* vector_res = vqdmlXl_lane(vector, vector3, vector4, lane),
7 then store the result. */
8 #define TEST_VQDMLXL_LANE1(INSN, T1, T2, W, W2, N, V, EXPECTED_CUMULATIVE_SAT, CMT) \
9 Set_Neon_Cumulative_Sat(0, VECT_VAR(vector_res, T1, W, N)); \
10 VECT_VAR(vector_res, T1, W, N) = \
11 INSN##_##T2##W2(VECT_VAR(vector, T1, W, N), \
12 VECT_VAR(vector3, T1, W2, N), \
13 VECT_VAR(vector4, T1, W2, N), \
15 vst1q_##T2##W(VECT_VAR(result, T1, W, N), \
16 VECT_VAR(vector_res, T1, W, N)); \
17 CHECK_CUMULATIVE_SAT(TEST_MSG, T1, W, N, EXPECTED_CUMULATIVE_SAT, CMT)
19 #define TEST_VQDMLXL_LANE(INSN, T1, T2, W, W2, N, V, EXPECTED_CUMULATIVE_SAT, CMT) \
20 TEST_VQDMLXL_LANE1(INSN, T1, T2, W, W2, N, V, EXPECTED_CUMULATIVE_SAT, CMT)
22 DECL_VARIABLE(vector, int, 32, 4);
23 DECL_VARIABLE(vector3, int, 16, 4);
24 DECL_VARIABLE(vector4, int, 16, 4);
25 DECL_VARIABLE(vector_res, int, 32, 4);
27 DECL_VARIABLE(vector, int, 64, 2);
28 DECL_VARIABLE(vector3, int, 32, 2);
29 DECL_VARIABLE(vector4, int, 32, 2);
30 DECL_VARIABLE(vector_res, int, 64, 2);
34 VLOAD(vector, buffer, q, int, s, 32, 4);
35 VLOAD(vector, buffer, q, int, s, 64, 2);
37 VDUP(vector3, , int, s, 16, 4, 0x55);
38 VDUP(vector4, , int, s, 16, 4, 0xBB);
39 VDUP(vector3, , int, s, 32, 2, 0x55);
40 VDUP(vector4, , int, s, 32, 2, 0xBB);
42 TEST_VQDMLXL_LANE(INSN_NAME, int, s, 32, 16, 4, 0, expected_cumulative_sat, "");
43 TEST_VQDMLXL_LANE(INSN_NAME, int, s, 64, 32, 2, 0, expected_cumulative_sat, "");
45 CHECK(TEST_MSG, int, 32, 4, PRIx32, expected, "");
46 CHECK(TEST_MSG, int, 64, 2, PRIx64, expected, "");
48 #define TEST_MSG2 "(mul with input=0)"
49 VDUP(vector3, , int, s, 16, 4, 0);
50 VDUP(vector3, , int, s, 32, 2, 0);
51 TEST_VQDMLXL_LANE(INSN_NAME, int, s, 32, 16, 4, 0, expected_cumulative_sat2, TEST_MSG2);
52 TEST_VQDMLXL_LANE(INSN_NAME, int, s, 64, 32, 2, 0, expected_cumulative_sat2, TEST_MSG2);
54 CHECK(TEST_MSG, int, 32, 4, PRIx32, expected2, TEST_MSG2);
55 CHECK(TEST_MSG, int, 64, 2, PRIx64, expected2, TEST_MSG2);
57 #define TEST_MSG3 "(mul with saturation)"
58 VDUP(vector3, , int, s, 16, 4, 0x8000);
59 VDUP(vector3, , int, s, 32, 2, 0x80000000);
60 VDUP(vector4, , int, s, 16, 4, 0x8000);
61 VDUP(vector4, , int, s, 32, 2, 0x80000000);
62 TEST_VQDMLXL_LANE(INSN_NAME, int, s, 32, 16, 4, 0, expected_cumulative_sat3, TEST_MSG3);
63 TEST_VQDMLXL_LANE(INSN_NAME, int, s, 64, 32, 2, 0, expected_cumulative_sat3, TEST_MSG3);
65 CHECK(TEST_MSG, int, 32, 4, PRIx32, expected3, TEST_MSG3);
66 CHECK(TEST_MSG, int, 64, 2, PRIx64, expected3, TEST_MSG3);
71 FNNAME (INSN_NAME) ();