166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman#define TRUE_VAL (!0)
266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman#define FALSE_VAL 0
366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman#define ARR_SIZE(arr) (sizeof(arr)/sizeof(arr[0]))
466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumantypedef unsigned long long int uint64_t;
666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumantypedef long long int int64_t;
766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman/* ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- */
966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanstruct harness_int64_pred {
1066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  const char     *fmt_string;
1166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  int64_t        *lhs;
1266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  int64_t        *rhs;
1366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  int64_t        *select_a;
1466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  int64_t        *select_b;
1566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  int             expected;
1666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  int64_t        *select_expected;
1766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman};
1866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
1966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanstruct harness_uint64_pred {
2066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  const char     *fmt_string;
2166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  uint64_t       *lhs;
2266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  uint64_t       *rhs;
2366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  uint64_t       *select_a;
2466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  uint64_t       *select_b;
2566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  int             expected;
2666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  uint64_t       *select_expected;
2766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman};
2866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
2966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanstruct int64_pred_s {
3066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  const char     *name;
3166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  int             (*predfunc) (int64_t, int64_t);
3266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  int64_t         (*selfunc) (int64_t, int64_t, int64_t, int64_t);
3366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  struct harness_int64_pred *tests;
3466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  int             n_tests;
3566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman};
3666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
3766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanstruct uint64_pred_s {
3866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  const char     *name;
3966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  int             (*predfunc) (uint64_t, uint64_t);
4066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  uint64_t        (*selfunc) (uint64_t, uint64_t, uint64_t, uint64_t);
4166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  struct harness_uint64_pred *tests;
4266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  int             n_tests;
4366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman};
44