PR116019: Improve tail call error message
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / advsimd-intrinsics / vqdmlXl_lane.inc
blob8596acf1f64dcb5a7319a6c9f670f4489dac260c
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, 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),                       \
14                     V);                                                 \
15   vst1q_##T2##W(VECT_VAR(result, T1, W, N),                             \
16                 VECT_VAR(vector_res, T1, W, N))
18 #define TEST_VQDMLXL_LANE(INSN, T1, T2, W, W2, N, V, CMT) \
19   TEST_VQDMLXL_LANE1(INSN, T1, T2, W, W2, N, V, CMT)
21   DECL_VARIABLE(vector, int, 32, 4);
22   DECL_VARIABLE(vector3, int, 16, 4);
23   DECL_VARIABLE(vector4, int, 16, 4);
24   DECL_VARIABLE(vector_res, int, 32, 4);
26   DECL_VARIABLE(vector, int, 64, 2);
27   DECL_VARIABLE(vector3, int, 32, 2);
28   DECL_VARIABLE(vector4, int, 32, 2);
29   DECL_VARIABLE(vector_res, int, 64, 2);
31   clean_results ();
33   VLOAD(vector, buffer, q, int, s, 32, 4);
34   VLOAD(vector, buffer, q, int, s, 64, 2);
36   VDUP(vector3, , int, s, 16, 4, 0x55);
37   VDUP(vector4, , int, s, 16, 4, 0xBB);
38   VDUP(vector3, , int, s, 32, 2, 0x55);
39   VDUP(vector4, , int, s, 32, 2, 0xBB);
41   TEST_VQDMLXL_LANE(INSN_NAME, int, s, 32, 16, 4, 0, "");
42   TEST_VQDMLXL_LANE(INSN_NAME, int, s, 64, 32, 2, 0, "");
44   CHECK(TEST_MSG, int, 32, 4, PRIx32, expected, "");
45   CHECK(TEST_MSG, int, 64, 2, PRIx64, expected, "");
47 #define TEST_MSG2 "(mul with input=0)"
48   VDUP(vector3, , int, s, 16, 4, 0);
49   VDUP(vector3, , int, s, 32, 2, 0);
50   TEST_VQDMLXL_LANE(INSN_NAME, int, s, 32, 16, 4, 0, TEST_MSG2);
51   TEST_VQDMLXL_LANE(INSN_NAME, int, s, 64, 32, 2, 0, TEST_MSG2);
53   CHECK(TEST_MSG, int, 32, 4, PRIx32, expected2, TEST_MSG2);
54   CHECK(TEST_MSG, int, 64, 2, PRIx64, expected2, TEST_MSG2);
56 #define TEST_MSG3 "(mul with saturation)"
57   VDUP(vector3, , int, s, 16, 4, 0x8000);
58   VDUP(vector3, , int, s, 32, 2, 0x80000000);
59   VDUP(vector4, , int, s, 16, 4, 0x8000);
60   VDUP(vector4, , int, s, 32, 2, 0x80000000);
61   TEST_VQDMLXL_LANE(INSN_NAME, int, s, 32, 16, 4, 0, TEST_MSG3);
62   TEST_VQDMLXL_LANE(INSN_NAME, int, s, 64, 32, 2, 0, TEST_MSG3);
64   CHECK(TEST_MSG, int, 32, 4, PRIx32, expected3, TEST_MSG3);
65   CHECK(TEST_MSG, int, 64, 2, PRIx64, expected3, TEST_MSG3);
68 int main (void)
70   FNNAME (INSN_NAME) ();
71   return 0;