2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / fma_3.h
blobefa88b5d97727a49b3c634a8787c4ad32907e18e
2 #ifndef fma_3
3 #define fma_3
5 TYPE __attribute__((sseregparm))
6 test_noneg_add_noneg_add (TYPE a, TYPE b, TYPE c)
8 return ((a * b) + c) * b + a;
11 TYPE __attribute__((sseregparm))
12 test_noneg_add_noneg_sub (TYPE a, TYPE b, TYPE c)
14 return ((a * b) + c) * b - a;
17 TYPE __attribute__((sseregparm))
18 test_noneg_add_neg_add (TYPE a, TYPE b, TYPE c)
20 return -((a * b) + c) * b + a;
23 TYPE __attribute__((sseregparm))
24 test_noneg_add_neg_sub (TYPE a, TYPE b, TYPE c)
26 return -((a * b) + c) * b - a;
29 TYPE __attribute__((sseregparm))
30 test_noneg_sub_noneg_add (TYPE a, TYPE b, TYPE c)
32 return ((a * b) - c) * b + a;
35 TYPE __attribute__((sseregparm))
36 test_noneg_sub_noneg_sub (TYPE a, TYPE b, TYPE c)
38 return ((a * b) - c) * b - a;
41 TYPE __attribute__((sseregparm))
42 test_noneg_sub_neg_add (TYPE a, TYPE b, TYPE c)
44 return -((a * b) - c) * b + a;
47 TYPE __attribute__((sseregparm))
48 test_noneg_sub_neg_sub (TYPE a, TYPE b, TYPE c)
50 return -((a * b) - c) * b - a;
53 TYPE __attribute__((sseregparm))
54 test_neg_add_noneg_add (TYPE a, TYPE b, TYPE c)
56 return (-(a * b) + c) * b + a;
59 TYPE __attribute__((sseregparm))
60 test_neg_add_noneg_sub (TYPE a, TYPE b, TYPE c)
62 return (-(a * b) + c) * b - a;
65 TYPE __attribute__((sseregparm))
66 test_neg_add_neg_add (TYPE a, TYPE b, TYPE c)
68 return -(-(a * b) + c) * b + a;
71 TYPE __attribute__((sseregparm))
72 test_neg_add_neg_sub (TYPE a, TYPE b, TYPE c)
74 return -(-(a * b) + c) * b - a;
77 TYPE __attribute__((sseregparm))
78 test_neg_sub_noneg_add (TYPE a, TYPE b, TYPE c)
80 return (-(a * b) - c) * b + a;
83 TYPE __attribute__((sseregparm))
84 test_neg_sub_noneg_sub (TYPE a, TYPE b, TYPE c)
86 return (-(a * b) - c) * b - a;
89 TYPE __attribute__((sseregparm))
90 test_neg_sub_neg_add (TYPE a, TYPE b, TYPE c)
92 return -(-(a * b) - c) * b + a;
95 TYPE __attribute__((sseregparm))
96 test_neg_sub_neg_sub (TYPE a, TYPE b, TYPE c)
98 return -(-(a * b) - c) * b - a;
101 #endif