2 #include "m128-check.h"
5 #define max(a, b) (((a) > (b)) ? (a):(b))
8 #define min(a, b) (((a) < (b)) ? (a):(b))
68 unsigned long long a
[4];
71 CHECK_EXP (union256i_b
, char, "%d")
72 CHECK_EXP (union256i_w
, short, "%d")
73 CHECK_EXP (union256i_d
, int, "0x%x")
74 CHECK_EXP (union256i_q
, long long, "0x%llx")
75 CHECK_EXP (union256
, float, "%f")
76 CHECK_EXP (union256d
, double, "%f")
77 CHECK_EXP (union256i_ub
, unsigned char, "%d")
78 CHECK_EXP (union256i_uw
, unsigned short, "%d")
79 CHECK_EXP (union256i_ud
, unsigned int, "0x%x")
80 CHECK_EXP (union256i_uq
, unsigned long long, "0x%llx")
82 #define CHECK_FP_EXP(UINON_TYPE, VALUE_TYPE, ESP, FMT) \
84 __attribute__((noinline, unused)) \
85 check_fp_##UINON_TYPE (UINON_TYPE u, const VALUE_TYPE *v) \
90 for (i = 0; i < ARRAY_SIZE (u.a); i++) \
91 if (u.a[i] > (v[i] + (ESP)) || u.a[i] < (v[i] - (ESP))) \
94 PRINTF ("%i: " FMT " != " FMT "\n", \
100 CHECK_FP_EXP (union256
, float, ESP_FLOAT
, "%f")
101 CHECK_FP_EXP (union256d
, double, ESP_DOUBLE
, "%f")