1073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon/*
2073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
380902f6bfb82ca1a0b17604602a47baf314b7876Christophe LyonCopyright (c) 2009, 2010, 2011, 2013 STMicroelectronics
4073831adf9442c019e8d34b18b0c04b1d780a19Christophe LyonWritten by Christophe Lyon
5073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
6073831adf9442c019e8d34b18b0c04b1d780a19Christophe LyonPermission is hereby granted, free of charge, to any person obtaining a copy
7073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyonof this software and associated documentation files (the "Software"), to deal
8073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyonin the Software without restriction, including without limitation the rights
9073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyonto use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyoncopies of the Software, and to permit persons to whom the Software is
11073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyonfurnished to do so, subject to the following conditions:
12073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
13073831adf9442c019e8d34b18b0c04b1d780a19Christophe LyonThe above copyright notice and this permission notice shall be included in
14073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyonall copies or substantial portions of the Software.
15073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
16073831adf9442c019e8d34b18b0c04b1d780a19Christophe LyonTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17073831adf9442c019e8d34b18b0c04b1d780a19Christophe LyonIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18073831adf9442c019e8d34b18b0c04b1d780a19Christophe LyonFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19073831adf9442c019e8d34b18b0c04b1d780a19Christophe LyonAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20073831adf9442c019e8d34b18b0c04b1d780a19Christophe LyonLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21073831adf9442c019e8d34b18b0c04b1d780a19Christophe LyonOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22073831adf9442c019e8d34b18b0c04b1d780a19Christophe LyonTHE SOFTWARE.
23073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
24073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon*/
25073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
261775be0bcaa673c19bb1f60f0c1bce1b91cdb414Christophe Lyon#if defined(__arm__) || defined(__aarch64__)
27073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon#include <arm_neon.h>
28073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon#else
290dab5f72da4b2434882b51b44ac377af9e3160feChristophe Lyon#include "stm-arm-neon.h"
30073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon#endif
31073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
32073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon#include "stm-arm-neon-ref.h"
33c8aa0f690d4febd69842708d468673b7f2c99c25Christophe Lyon#include <math.h>
34073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
35073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
36073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon#define FNNAME1(NAME) void exec_ ## NAME (void)
37073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon#define FNNAME(NAME) FNNAME1(NAME)
38073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
39073831adf9442c019e8d34b18b0c04b1d780a19Christophe LyonFNNAME (INSN_NAME)
40073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon{
41073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  int i;
42073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
43073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  /* Basic test: y=vcomp(x,x), then store the result.  */
44073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon#define TEST_VCOMP1(INSN, Q, T1, T2, T3, W, N)				\
45073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  VECT_VAR(vector_res, T3, W, N) =					\
46073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon    INSN##Q##_##T2##W(VECT_VAR(vector, T1, W, N),			\
47073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon		      VECT_VAR(vector2, T1, W, N));			\
48073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  vst1##Q##_u##W(VECT_VAR(result, T3, W, N), VECT_VAR(vector_res, T3, W, N))
49073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
50073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon#define TEST_VCOMP(INSN, Q, T1, T2, T3, W, N)				\
51073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP1(INSN, Q, T1, T2, T3, W, N)
52073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
53073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  /* With ARM RVCT, we need to declare variables before any executable
54073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon     statement */
55073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  /* No need for 64 bits elements */
56073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector, int, 8, 8);
57073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector, int, 16, 4);
58073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector, int, 32, 2);
59073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector, uint, 8, 8);
60073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector, uint, 16, 4);
61073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector, uint, 32, 2);
62073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector, float, 32, 2);
63073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector, int, 8, 16);
64073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector, int, 16, 8);
65073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector, int, 32, 4);
66073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector, uint, 8, 16);
67073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector, uint, 16, 8);
68073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector, uint, 32, 4);
69073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector, float, 32, 4);
70073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
71073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector2, int, 8, 8);
72073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector2, int, 16, 4);
73073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector2, int, 32, 2);
74073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector2, uint, 8, 8);
75073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector2, uint, 16, 4);
76073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector2, uint, 32, 2);
77073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector2, float, 32, 2);
78073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector2, int, 8, 16);
79073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector2, int, 16, 8);
80073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector2, int, 32, 4);
81073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector2, uint, 8, 16);
82073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector2, uint, 16, 8);
83073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector2, uint, 32, 4);
84073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector2, float, 32, 4);
85073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
86073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector_res, uint, 8, 8);
87073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector_res, uint, 16, 4);
88073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector_res, uint, 32, 2);
89073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector_res, uint, 8, 16);
90073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector_res, uint, 16, 8);
91073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DECL_VARIABLE(vector_res, uint, 32, 4);
92073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
93073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  clean_results ();
94073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
95073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  /* There is no 64 bits variant, we can't use the generic initializer  */
96f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VLOAD(vector, buffer, , int, s, 8, 8);
97f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VLOAD(vector, buffer, , int, s, 16, 4);
98f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VLOAD(vector, buffer, , int, s, 32, 2);
99f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VLOAD(vector, buffer, , uint, u, 8, 8);
100f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VLOAD(vector, buffer, , uint, u, 16, 4);
101f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VLOAD(vector, buffer, , uint, u, 32, 2);
102f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VLOAD(vector, buffer, , float, f, 32, 2);
103f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon
104f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VLOAD(vector, buffer, q, int, s, 8, 16);
105f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VLOAD(vector, buffer, q, int, s, 16, 8);
106f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VLOAD(vector, buffer, q, int, s, 32, 4);
107f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VLOAD(vector, buffer, q, uint, u, 8, 16);
108f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VLOAD(vector, buffer, q, uint, u, 16, 8);
109f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VLOAD(vector, buffer, q, uint, u, 32, 4);
110f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VLOAD(vector, buffer, q, float, f, 32, 4);
111073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
112073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  /* Choose init value arbitrarily, will be used for vector
113073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon     comparison */
114f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, , int, s, 8, 8, -10);
115f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, , int, s, 16, 4, -14);
116f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, , int, s, 32, 2, -16);
117f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, , uint, u, 8, 8, 0xF3);
118f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, , uint, u, 16, 4, 0xFFF2);
119f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, , uint, u, 32, 2, 0xFFFFFFF1);
120f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, , float, f, 32, 2, -15.0f);
121f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon
122f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, q, int, s, 8, 16, -4);
123f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, q, int, s, 16, 8, -10);
124f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, q, int, s, 32, 4, -14);
125f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, q, uint, u, 8, 16, 0xF4);
126f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, q, uint, u, 16, 8, 0xFFF6);
127f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, q, uint, u, 32, 4, 0xFFFFFFF2);
128f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, q, float, f, 32, 4, -14.0f);
129073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
130073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  /* The same result buffers are used multiple times, so output them
131073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon     before overwriting them  */
132073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  fprintf(ref_file, "\n%s output:\n", TEST_MSG);
133bf2182605cb0dac32f6cd9194664994beae299faChristophe Lyon  fprintf(gcc_tests_file, "\n%s output:\n", TEST_MSG);
134073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP(INSN_NAME, , int, s, uint, 8, 8);
135073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP(INSN_NAME, , int, s, uint, 16, 4);
136073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP(INSN_NAME, , int, s, uint, 32, 2);
137073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DUMP(TEST_MSG, uint, 8, 8, PRIx8);
138073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DUMP(TEST_MSG, uint, 16, 4, PRIx16);
139073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DUMP(TEST_MSG, uint, 32, 2, PRIx32);
140073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
141073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP(INSN_NAME, , uint, u, uint, 8, 8);
142073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP(INSN_NAME, , uint, u, uint, 16, 4);
143073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP(INSN_NAME, , uint, u, uint, 32, 2);
144073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DUMP(TEST_MSG, uint, 8, 8, PRIx8);
145073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DUMP(TEST_MSG, uint, 16, 4, PRIx16);
146073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DUMP(TEST_MSG, uint, 32, 2, PRIx32);
147073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
148073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP(INSN_NAME, q, int, s, uint, 8, 16);
149073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP(INSN_NAME, q, int, s, uint, 16, 8);
150073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP(INSN_NAME, q, int, s, uint, 32, 4);
151073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DUMP(TEST_MSG, uint, 8, 16, PRIx8);
152073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DUMP(TEST_MSG, uint, 16, 8, PRIx16);
153073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DUMP(TEST_MSG, uint, 32, 4, PRIx32);
154073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
155073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP(INSN_NAME, q, uint, u, uint, 8, 16);
156073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP(INSN_NAME, q, uint, u, uint, 16, 8);
157073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP(INSN_NAME, q, uint, u, uint, 32, 4);
158073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DUMP(TEST_MSG, uint, 8, 16, PRIx8);
159073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DUMP(TEST_MSG, uint, 16, 8, PRIx16);
160073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DUMP(TEST_MSG, uint, 32, 4, PRIx32);
161073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
162073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP(INSN_NAME, , float, f, uint, 32, 2);
163073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DUMP(TEST_MSG, uint, 32, 2, PRIx32);
164073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
165073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP(INSN_NAME, q, float, f, uint, 32, 4);
166073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DUMP(TEST_MSG, uint, 32, 4, PRIx32);
167073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
168073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  /* Extra tests to have 100% coverage on all the variants */
169f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, , uint, u, 32, 2, 0xFFFFFFF0);
170073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP(INSN_NAME, , uint, u, uint, 32, 2);
171073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DUMP(TEST_MSG, uint, 32, 2, PRIx32);
172073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
173f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, , int, s, 32, 2, -15);
174073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP(INSN_NAME, , int, s, uint, 32, 2);
175073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DUMP(TEST_MSG, uint, 32, 2, PRIx32);
176073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon
177f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, , float, f, 32, 2, -16.0f);
178073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  TEST_VCOMP(INSN_NAME, , float, f, uint, 32, 2);
179073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon  DUMP(TEST_MSG, uint, 32, 2, PRIx32);
180c8aa0f690d4febd69842708d468673b7f2c99c25Christophe Lyon
181c8aa0f690d4febd69842708d468673b7f2c99c25Christophe Lyon
182c8aa0f690d4febd69842708d468673b7f2c99c25Christophe Lyon  /* Extra FP tests with special values (NaN, ....) */
183f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector, , float, f, 32, 2, 1.0);
184f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, , float, f, 32, 2, NAN);
185c8aa0f690d4febd69842708d468673b7f2c99c25Christophe Lyon  TEST_VCOMP(INSN_NAME, , float, f, uint, 32, 2);
186269df92488695ef609d3759a28fa725a677161e2Christophe Lyon  DUMP(TEST_MSG " FP special (NaN)", uint, 32, 2, PRIx32);
187269df92488695ef609d3759a28fa725a677161e2Christophe Lyon
188f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector, , float, f, 32, 2, 1.0);
189f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, , float, f, 32, 2, -NAN);
190269df92488695ef609d3759a28fa725a677161e2Christophe Lyon  TEST_VCOMP(INSN_NAME, , float, f, uint, 32, 2);
191269df92488695ef609d3759a28fa725a677161e2Christophe Lyon  DUMP(TEST_MSG " FP special (-NaN)", uint, 32, 2, PRIx32);
192c8aa0f690d4febd69842708d468673b7f2c99c25Christophe Lyon
193f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector, , float, f, 32, 2, NAN);
194f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, , float, f, 32, 2, 1.0);
195c8aa0f690d4febd69842708d468673b7f2c99c25Christophe Lyon  TEST_VCOMP(INSN_NAME, , float, f, uint, 32, 2);
196269df92488695ef609d3759a28fa725a677161e2Christophe Lyon  DUMP(TEST_MSG " FP special (NaN)", uint, 32, 2, PRIx32);
197c8aa0f690d4febd69842708d468673b7f2c99c25Christophe Lyon
198f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector, , float, f, 32, 2, 1.0);
199f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, , float, f, 32, 2, HUGE_VALF);
200c8aa0f690d4febd69842708d468673b7f2c99c25Christophe Lyon  TEST_VCOMP(INSN_NAME, , float, f, uint, 32, 2);
201c8aa0f690d4febd69842708d468673b7f2c99c25Christophe Lyon  DUMP(TEST_MSG " FP special (inf)", uint, 32, 2, PRIx32);
202c8aa0f690d4febd69842708d468673b7f2c99c25Christophe Lyon
203f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector, , float, f, 32, 2, 1.0);
204f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, , float, f, 32, 2, -HUGE_VALF);
205269df92488695ef609d3759a28fa725a677161e2Christophe Lyon  TEST_VCOMP(INSN_NAME, , float, f, uint, 32, 2);
206269df92488695ef609d3759a28fa725a677161e2Christophe Lyon  DUMP(TEST_MSG " FP special (-inf)", uint, 32, 2, PRIx32);
207269df92488695ef609d3759a28fa725a677161e2Christophe Lyon
208f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector, , float, f, 32, 2, HUGE_VALF);
209f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, , float, f, 32, 2, 1.0);
210c8aa0f690d4febd69842708d468673b7f2c99c25Christophe Lyon  TEST_VCOMP(INSN_NAME, , float, f, uint, 32, 2);
211c8aa0f690d4febd69842708d468673b7f2c99c25Christophe Lyon  DUMP(TEST_MSG " FP special (inf)", uint, 32, 2, PRIx32);
212c8aa0f690d4febd69842708d468673b7f2c99c25Christophe Lyon
213f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector, , float, f, 32, 2, -0.0);
214f20536724d4cc8432d5b804082415c8391f88f9bChristophe Lyon  VDUP(vector2, , float, f, 32, 2, 0.0);
215c8aa0f690d4febd69842708d468673b7f2c99c25Christophe Lyon  TEST_VCOMP(INSN_NAME, , float, f, uint, 32, 2);
216c8aa0f690d4febd69842708d468673b7f2c99c25Christophe Lyon  DUMP(TEST_MSG " FP special (-0.0)", uint, 32, 2, PRIx32);
21780902f6bfb82ca1a0b17604602a47baf314b7876Christophe Lyon
21880902f6bfb82ca1a0b17604602a47baf314b7876Christophe Lyon#ifdef EXTRA_TESTS
21980902f6bfb82ca1a0b17604602a47baf314b7876Christophe Lyon  EXTRA_TESTS();
22080902f6bfb82ca1a0b17604602a47baf314b7876Christophe Lyon#endif
221073831adf9442c019e8d34b18b0c04b1d780a19Christophe Lyon}
222