3 #include "sse4_1-check.h"
5 #define DIM(a) (sizeof (a) / sizeof (a)[0])
7 static int modes
[] = { FE_TONEAREST
, FE_UPWARD
, FE_DOWNWARD
, FE_TOWARDZERO
};
12 int i
, j
, ri
, round_save
;
14 round_save
= fegetround ();
15 for (ri
= 0; ri
< DIM (modes
); ri
++) {
16 fesetround (modes
[ri
]);
17 for (i
= 0; i
< DIM (data
); i
++) {
19 guess
.x
= ROUND_INTRIN (data
[i
].value
.x
, /* Ignored. */);
20 for (j
= 0; j
< DIM (data
[i
].value
.f
); j
++) {
21 if (guess
.f
[j
] != data
[i
].answer
[j
])
26 fesetround (round_save
);