Debian Codegraph @

gcc/testsuite/gcc.target/riscv/scalar_sat_binary.h

raw
1 #ifndef HAVE_DEFINED_SCALAR_SAT_BINARY
2 #define HAVE_DEFINED_SCALAR_SAT_BINARY
3
4 /* To leverage this header files for run test, you need to:
5 1. define T as the type, for example uint8_t,
6 2. define RUN_SAT_BINARY as run function.
7 3. prepare the test_data for test cases.
8 */
9
10 int
11 main ()
12 {
13 unsigned i;
14 T *d;
15
16 for (i = 0; i < sizeof (test_data) / sizeof (test_data[0]); i++)
17 {
18 d = test_data[i];
19
20 if (RUN_SAT_BINARY (T, d[0], d[1]) != d[2])
21 __builtin_abort ();
22 }
23
24 return 0;
25 }
26
27 #endif