Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/vect-fp.x

raw
1
2 typedef float F32;
3 typedef double F64;
4 typedef float *__restrict__ pRF32;
5 typedef double *__restrict__ pRF64;
6
7 extern float fabsf (float);
8 extern double fabs (double);
9
10 #define DEF3a(fname, type, op) \
11 void fname##_##type (pR##type a, \
12 pR##type b, \
13 pR##type c) \
14 { \
15 int i; \
16 for (i = 0; i < 16; i++) \
17 a[i] = op (b[i] - c[i]); \
18 }
19
20 #define DEF3(fname, type, op) \
21 void fname##_##type (pR##type a, \
22 pR##type b, \
23 pR##type c) \
24 { \
25 int i; \
26 for (i = 0; i < 16; i++) \
27 a[i] = b[i] op c[i]; \
28 }
29
30 #define DEF2(fname, type, op) \
31 void fname##_##type (pR##type a, \
32 pR##type b) \
33 { \
34 int i; \
35 for (i = 0; i < 16; i++) \
36 a[i] = op(b[i]); \
37 }
38
39
40 #define DEFN3a(fname, op) \
41 DEF3a (fname, F32, op) \
42 DEF3a (fname, F64, op)
43
44 #define DEFN3(fname, op) \
45 DEF3 (fname, F32, op) \
46 DEF3 (fname, F64, op)
47
48 #define DEFN2(fname, op) \
49 DEF2 (fname, F32, op) \
50 DEF2 (fname, F64, op)
51
52 DEFN3 (add, +)
53 DEFN3 (sub, -)
54 DEFN3 (mul, *)
55 DEFN3 (div, /)
56 DEFN2 (neg, -)
57 DEF2 (abs, F32, fabsf)
58 DEF2 (abs, F64, fabs)
59 DEF3a (fabd, F32, fabsf)
60 DEF3a (fabd, F64, fabs)