Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
Go to the source code of this file.
Defines | |
#define | IS_SUPPORTED_INT_TYPE(t) |
#define | is_zero8(v) (DSEXT8(v) == 0) |
#define | is_neg8(v) (((v) & 0x80) != 0) |
#define | is_zero16(v) (DSEXT16(v) == 0) |
#define | is_neg16(v) (((v) & 0x8000) != 0) |
#define | is_zero32(v) (DSEXT32(v) == 0) |
#define | is_neg32(v) (((v) & 0x80000000) != 0) |
#define | is_zero46(v) ((v) == 0) |
#define | is_neg46(v) ((v) < 0) |
#define | is_zero64(v) ((v) == 0) |
#define | is_neg64(v) ((v) < 0) |
#define | TEST_BINARY_BIT_OP_SIGNED(size, opr, func) |
#define | TEST_BINARY_BIT_OP_UNSIGNED(size, opr, func) |
#define | TEST_BINARY_BIT_OP_TYPES(opr, func) |
#define | TEST_UNARY_BIT_OP_SIGNED(size, opr, func) |
#define | TEST_UNARY_BIT_OP_UNSIGNED(size, opr, func) |
#define | TEST_UNARY_BIT_OP_TYPES(opr, func) |
#define | TEST_SHIFT_OP_SIGNED(size, max_shift, opr, func) |
#define | TEST_SHIFT_OP_UNSIGNED(size, max_shift, opr, func) |
#define | TEST_SHIFT_OP_TYPES(opr, func) |
#define | TEST_DSHIFT_OP_SIGNED(size, max_shift, opr) |
#define | TEST_DSHIFT_OP_UNSIGNED(size, max_shift, opr) |
#define | TEST_DSHIFT_OP_TYPES(opr) |
#define | TEST_ISHFT_TYPES |
#define | TEST_ISHFTC_TYPES |
#define | TEST_IBITS_TYPES |
#define | TEST_MASK_OP_SIGNED(size, max_shift) |
#define | TEST_MASK_OP_UNSIGNED(size, max_shift) |
#define | TEST_MASK_OP_TYPES |
#define | TEST_LP_OP_SIGNED(size, opr, func) |
#define | TEST_LP_OP_UNSIGNED(size, opr, func) |
#define | TEST_LP_OP_TYPES(opr, func) |
#define | TEST_STATUS_SIGNED(size) |
#define | TEST_STATUS_UNSIGNED(size) |
#define | TEST_STATUS_TYPES |
#define | TEST_ADDSUB_OP_SIGNED(size, opr, func) |
#define | TEST_ADDSUB_OP_UNSIGNED(size, opr, func) |
#define | TEST_ADDSUB_OP_TYPES(opr, func) |
#define | TEST_NEG_OP_SIGNED(size) |
#define | TEST_NEG_OP_UNSIGNED(size) |
#define | TEST_NEG_OP_TYPES |
#define | TEST_ABS_OP_SIGNED(size) |
#define | TEST_ABS_OP_UNSIGNED(size) |
#define | TEST_ABS_OP_TYPES |
#define | TEST_MUL_OP_SIGNED(size) |
#define | TEST_MUL_OP_UNSIGNED(size) |
#define | TEST_MUL_OP_TYPES |
#define | TEST_DIV_OP_SIGNED(size) |
#define | TEST_DIV_OP_UNSIGNED(size) |
#define | TEST_DIV_OP_TYPES |
#define | TEST_MOD_OP_SIGNED(size) |
#define | TEST_MOD_OP_UNSIGNED(size) |
#define | TEST_MOD_OP_TYPES |
#define | TEST_COMPARE_OP_SIGNED(size) |
#define | TEST_COMPARE_OP_UNSIGNED(size) |
#define | TEST_COMPARE_OP_TYPES |
Functions | |
SINT64 | DSEXT8 (SINT64 v) |
SINT64 | SEXT8 (SINT64 v) |
SINT64 | LS8 (AR_INT_64 *vp) |
UINT64 | LU8 (AR_INT_64 *vp) |
static SINT64 | _dshiftl8 (SINT64 op1, SINT64 op2, SINT64 shcnt) |
static SINT64 | _dshiftr8 (SINT64 op1, SINT64 op2, SINT64 shcnt) |
static SINT64 | _mask8 (SINT64 bits) |
static SINT64 | _leadz8 (SINT64 val) |
static SINT64 | _popcnt8 (SINT64 val) |
static SINT64 | _poppar8 (SINT64 val) |
SINT64 | DSEXT16 (SINT64 v) |
SINT64 | SEXT16 (SINT64 v) |
SINT64 | LS16 (AR_INT_64 *vp) |
UINT64 | LU16 (AR_INT_64 *vp) |
static SINT64 | _dshiftl16 (SINT64 op1, SINT64 op2, SINT64 shcnt) |
static SINT64 | _dshiftr16 (SINT64 op1, SINT64 op2, SINT64 shcnt) |
static SINT64 | _mask16 (SINT64 bits) |
static SINT64 | _leadz16 (SINT64 val) |
static SINT64 | _popcnt16 (SINT64 val) |
static SINT64 | _poppar16 (SINT64 val) |
SINT64 | DSEXT32 (SINT64 v) |
SINT64 | SEXT32 (SINT64 v) |
SINT64 | LS32 (AR_INT_64 *vp) |
UINT64 | LU32 (AR_INT_64 *vp) |
static SINT64 | _dshiftl32 (SINT64 op1, SINT64 op2, SINT64 shcnt) |
static SINT64 | _dshiftr32 (SINT64 op1, SINT64 op2, SINT64 shcnt) |
static SINT64 | _mask32 (SINT64 bits) |
static SINT64 | _leadz32 (SINT64 val) |
static SINT64 | _popcnt32 (SINT64 val) |
static SINT64 | _poppar32 (SINT64 val) |
SINT64 | DSEXT46 (SINT64 v) |
SINT64 | SEXT46 (SINT64 v) |
static SINT64 | _dshiftl46 (SINT64 op1, SINT64 op2, SINT64 shcnt) |
static SINT64 | _dshiftr46 (SINT64 op1, SINT64 op2, SINT64 shcnt) |
static SINT64 | _mask46 (SINT64 bits) |
static SINT64 | _leadz46 (SINT64 val) |
static SINT64 | _popcnt46 (SINT64 val) |
static SINT64 | _poppar46 (SINT64 val) |
SINT64 | DSEXT64 (SINT64 v) |
SINT64 | SEXT64 (SINT64 v) |
static SINT64 | _dshiftl64 (SINT64 op1, SINT64 op2, SINT64 shcnt) |
static SINT64 | _dshiftr64 (SINT64 op1, SINT64 op2, SINT64 shcnt) |
static SINT64 | _mask64 (SINT64 bits) |
static SINT64 | _leadz64 (SINT64 val) |
static SINT64 | _popcnt64 (SINT64 val) |
static SINT64 | _poppar64 (SINT64 val) |
main () | |
test_bitor () | |
test_bitand () | |
test_bitxor () | |
test_bitcomplement () | |
test_shiftl () | |
test_shiftr () | |
test_dshiftl () | |
test_dshiftr () | |
static void | test_ishft_signed (int size) |
test_ishft () | |
static void | test_ishftc_signed (int size) |
test_ishftc () | |
static void | test_ibits_signed (int size) |
test_ibits () | |
test_mask () | |
test_leadz () | |
test_popcnt () | |
test_poppar () | |
test_arstatus () | |
test_add () | |
test_subtract () | |
test_negate () | |
test_abs () | |
test_multiply () | |
test_divide () | |
test_modulo () | |
test_compare () | |
Variables | |
AR_INT_64 | cool_ints [] |
int | num_cool_ints = sizeof(cool_ints)/sizeof(AR_INT_64) |
AR_INT_64 | dshift_vals [] |
int | num_dshift_vals = sizeof(dshift_vals)/sizeof(AR_INT_64) |
AR_TYPE | ar_types [] |
int | num_ar_types = sizeof(ar_types) / sizeof(AR_TYPE) |
AR_TYPE | sint8_artype = AR_Int_8_S |
AR_TYPE | uint8_artype = AR_Int_8_U |
AR_TYPE | sint16_artype = AR_Int_16_S |
AR_TYPE | uint16_artype = AR_Int_16_U |
AR_TYPE | sint24_artype = AR_Int_24_S |
AR_TYPE | uint24_artype = AR_Int_24_U |
AR_TYPE | sint32_artype = AR_Int_32_S |
AR_TYPE | uint32_artype = AR_Int_32_U |
AR_TYPE | sint46_artype = AR_Int_46_S |
AR_TYPE | sint64_artype = AR_Int_64_S |
AR_TYPE | uint64_artype = AR_Int_64_U |
SINT64 | act_result [sizeof(cool_ints)/sizeof(AR_INT_64)] |
int | act_status [sizeof(cool_ints)/sizeof(AR_INT_64)] |
AR_INT_64 | test_result [sizeof(cool_ints)/sizeof(AR_INT_64)] |
int | test_status [sizeof(cool_ints)/sizeof(AR_INT_64)] |
static char | USMID [] = "\n%Z%%M% %I% %G% %U%\n" |
static char | rcsid [] = "$Id: testint.c,v 1.1.1.1 2002-05-22 20:06:19 dsystem Exp $" |
#define is_neg16 | ( | v | ) | (((v) & 0x8000) != 0) |
Definition at line 615 of file testint.c.
Referenced by test_ibits_signed(), test_ishft_signed(), and test_ishftc_signed().
#define is_neg32 | ( | v | ) | (((v) & 0x80000000) != 0) |
Definition at line 715 of file testint.c.
Referenced by test_ibits_signed(), test_ishft_signed(), and test_ishftc_signed().
#define is_neg64 | ( | v | ) | ((v) < 0) |
Definition at line 865 of file testint.c.
Referenced by test_ibits_signed(), test_ishft_signed(), and test_ishftc_signed().
#define is_neg8 | ( | v | ) | (((v) & 0x80) != 0) |
Definition at line 515 of file testint.c.
Referenced by test_ibits_signed(), test_ishft_signed(), and test_ishftc_signed().
#define IS_SUPPORTED_INT_TYPE | ( | t | ) |
((t) == AR_Int_8_S || (t) == AR_Int_8_U || \ (t) == AR_Int_16_S || (t) == AR_Int_16_U || \ (t) == AR_Int_32_S || (t) == AR_Int_32_U || \ (t) == AR_Int_46_S || \ (t) == AR_Int_64_S || (t) == AR_Int_64_U)
Definition at line 614 of file testint.c.
Referenced by test_ibits_signed(), test_ishft_signed(), and test_ishftc_signed().
Definition at line 714 of file testint.c.
Referenced by test_ibits_signed(), test_ishft_signed(), and test_ishftc_signed().
#define is_zero64 | ( | v | ) | ((v) == 0) |
Definition at line 864 of file testint.c.
Referenced by test_ibits_signed(), test_ishft_signed(), and test_ishftc_signed().
Definition at line 514 of file testint.c.
Referenced by test_ibits_signed(), test_ishft_signed(), and test_ishftc_signed().
#define TEST_ABS_OP_SIGNED | ( | size | ) |
Definition at line 3472 of file testint.c.
Referenced by test_abs().
#define TEST_ABS_OP_TYPES |
do { \ int j, k; \ \ printf(" Testing: types %-10s: ", "abs"); \ \ for (j=0; j<num_ar_types; j++) \ { \ for (k=0; k<num_ar_types; k++) \ { \ act_status[k] = AR_STAT_OK; \ if (ar_types[j] != ar_types[k] || \ !IS_SUPPORTED_INT_TYPE(ar_types[j])) \ act_status[k] = AR_STAT_INVALID_TYPE; \ \ test_status[k] = AR_abs((AR_DATA *)&test_result[1], \ &ar_types[j], \ (AR_DATA *)&cool_ints[1], \ &ar_types[k]); \ \ if ((act_status[k] ^ test_status[k]) & \ AR_STAT_INVALID_TYPE) \ { \ printf(" ERROR: incorrect status at %d,%d\n", j, k); \ abort(); \ } \ } \ } \ \ printf("PASSED\n"); \ } while (0)
Definition at line 3561 of file testint.c.
Referenced by test_abs().
#define TEST_ABS_OP_UNSIGNED | ( | size | ) |
Definition at line 3521 of file testint.c.
Referenced by test_abs().
#define TEST_ADDSUB_OP_SIGNED | ( | size, | |
opr, | |||
func | |||
) |
Definition at line 3113 of file testint.c.
Referenced by test_add(), and test_subtract().
#define TEST_ADDSUB_OP_TYPES | ( | opr, | |
func | |||
) |
Definition at line 3222 of file testint.c.
Referenced by test_add(), and test_subtract().
#define TEST_ADDSUB_OP_UNSIGNED | ( | size, | |
opr, | |||
func | |||
) |
Definition at line 3176 of file testint.c.
Referenced by test_add(), and test_subtract().
#define TEST_BINARY_BIT_OP_SIGNED | ( | size, | |
opr, | |||
func | |||
) |
Definition at line 939 of file testint.c.
Referenced by test_bitand(), test_bitor(), and test_bitxor().
#define TEST_BINARY_BIT_OP_TYPES | ( | opr, | |
func | |||
) |
Definition at line 1034 of file testint.c.
Referenced by test_bitand(), test_bitor(), and test_bitxor().
#define TEST_BINARY_BIT_OP_UNSIGNED | ( | size, | |
opr, | |||
func | |||
) |
Definition at line 987 of file testint.c.
Referenced by test_bitand(), test_bitor(), and test_bitxor().
#define TEST_COMPARE_OP_SIGNED | ( | size | ) |
Definition at line 4253 of file testint.c.
Referenced by test_compare().
#define TEST_COMPARE_OP_TYPES |
do { \ int j, k; \ \ printf(" Testing: types %-10s: ", "compare"); \ \ for (j=0; j<num_ar_types; j++) \ { \ for (k=0; k<num_ar_types; k++) \ { \ act_status[k] = AR_STAT_OK; \ if (ar_types[j] != ar_types[k] || \ !IS_SUPPORTED_INT_TYPE(ar_types[j])) \ act_status[k] = AR_Compare_Invalid; \ \ test_status[k] = AR_compare((AR_DATA *)&cool_ints[1], \ &ar_types[j], \ (AR_DATA *)&cool_ints[1], \ &ar_types[k]); \ \ if ((act_status[k] == AR_Compare_Invalid) ^ \ (test_status[k] == AR_Compare_Invalid)) \ { \ printf(" ERROR: incorrect status at %d,%d\n", j, k); \ abort(); \ } \ } \ } \ \ printf("PASSED\n"); \ } while (0)
#define TEST_COMPARE_OP_UNSIGNED | ( | size | ) |
Definition at line 4301 of file testint.c.
Referenced by test_compare().
#define TEST_DIV_OP_SIGNED | ( | size | ) |
Definition at line 3831 of file testint.c.
Referenced by test_divide().
#define TEST_DIV_OP_TYPES |
#define TEST_DIV_OP_UNSIGNED | ( | size | ) |
Definition at line 3935 of file testint.c.
Referenced by test_divide().
#define TEST_DSHIFT_OP_SIGNED | ( | size, | |
max_shift, | |||
opr | |||
) |
Definition at line 1503 of file testint.c.
Referenced by test_dshiftl(), and test_dshiftr().
#define TEST_DSHIFT_OP_TYPES | ( | opr | ) |
Definition at line 1636 of file testint.c.
Referenced by test_dshiftl(), and test_dshiftr().
#define TEST_DSHIFT_OP_UNSIGNED | ( | size, | |
max_shift, | |||
opr | |||
) |
Definition at line 1571 of file testint.c.
Referenced by test_dshiftl(), and test_dshiftr().
#define TEST_IBITS_TYPES |
Definition at line 2581 of file testint.c.
Referenced by test_ibits().
#define TEST_ISHFT_TYPES |
Definition at line 1909 of file testint.c.
Referenced by test_ishft().
#define TEST_ISHFTC_TYPES |
Definition at line 2275 of file testint.c.
Referenced by test_ishftc().
#define TEST_LP_OP_SIGNED | ( | size, | |
opr, | |||
func | |||
) |
Definition at line 2787 of file testint.c.
Referenced by test_leadz(), test_popcnt(), and test_poppar().
#define TEST_LP_OP_TYPES | ( | opr, | |
func | |||
) |
do { \ int j, k; \ \ printf(" Testing: types %-10s: ", #opr); \ \ for (j=0; j<num_ar_types; j++) \ { \ for (k=0; k<num_ar_types; k++) \ { \ act_status[k] = AR_STAT_OK; \ if (!IS_SUPPORTED_INT_TYPE(ar_types[j]) || \ !IS_SUPPORTED_INT_TYPE(ar_types[k])) \ act_status[k] = AR_STAT_INVALID_TYPE; \ \ test_status[k] = func((AR_DATA *)&test_result[1], \ &ar_types[j], \ (AR_DATA *)&cool_ints[1], \ &ar_types[k]); \ \ if ((act_status[k] ^ test_status[k]) & \ AR_STAT_INVALID_TYPE) \ { \ printf(" ERROR: incorrect status at %d,%d\n", j, k); \ abort(); \ } \ } \ } \ \ printf("PASSED\n"); \ } while (0)
Definition at line 2868 of file testint.c.
Referenced by test_leadz(), test_popcnt(), and test_poppar().
#define TEST_LP_OP_UNSIGNED | ( | size, | |
opr, | |||
func | |||
) |
Definition at line 2829 of file testint.c.
Referenced by test_leadz(), test_popcnt(), and test_poppar().
#define TEST_MASK_OP_SIGNED | ( | size, | |
max_shift | |||
) |
Definition at line 2655 of file testint.c.
Referenced by test_mask().
#define TEST_MASK_OP_TYPES |
do { \ int j, k; \ \ printf(" Testing: types %-10s: ", "_mask"); \ \ for (j=0; j<num_ar_types; j++) \ { \ for (k=0; k<num_ar_types; k++) \ { \ act_status[k] = AR_STAT_OK; \ if (ar_types[j] != ar_types[k] || \ !IS_SUPPORTED_INT_TYPE(ar_types[j])) \ act_status[k] = AR_STAT_INVALID_TYPE; \ \ test_status[k] = AR_mask((AR_DATA *)&test_result[1], \ &ar_types[j], \ (AR_DATA *)&cool_ints[1], \ &ar_types[k]); \ \ if ((act_status[k] ^ test_status[k]) & \ AR_STAT_INVALID_TYPE) \ { \ printf(" ERROR: incorrect status at %d,%d\n", j, k); \ abort(); \ } \ } \ } \ \ printf("PASSED\n"); \ } while (0)
Definition at line 2754 of file testint.c.
Referenced by test_mask().
#define TEST_MASK_OP_UNSIGNED | ( | size, | |
max_shift | |||
) |
Definition at line 2706 of file testint.c.
Referenced by test_mask().
#define TEST_MOD_OP_SIGNED | ( | size | ) |
Definition at line 4057 of file testint.c.
Referenced by test_modulo().
#define TEST_MOD_OP_TYPES |
Definition at line 4179 of file testint.c.
Referenced by test_modulo().
#define TEST_MOD_OP_UNSIGNED | ( | size | ) |
Definition at line 4123 of file testint.c.
Referenced by test_modulo().
#define TEST_MUL_OP_SIGNED | ( | size | ) |
Definition at line 3621 of file testint.c.
Referenced by test_multiply().
#define TEST_MUL_OP_TYPES |
#define TEST_MUL_OP_UNSIGNED | ( | size | ) |
Definition at line 3718 of file testint.c.
Referenced by test_multiply().
#define TEST_NEG_OP_SIGNED | ( | size | ) |
Definition at line 3311 of file testint.c.
Referenced by test_negate().
#define TEST_NEG_OP_TYPES |
do { \ int j, k; \ \ printf(" Testing: types %-10s: ", "unary -"); \ \ for (j=0; j<num_ar_types; j++) \ { \ for (k=0; k<num_ar_types; k++) \ { \ act_status[k] = AR_STAT_OK; \ if (ar_types[j] != ar_types[k] || \ !IS_SUPPORTED_INT_TYPE(ar_types[j])) \ act_status[k] = AR_STAT_INVALID_TYPE; \ \ test_status[k] = AR_negate((AR_DATA *)&test_result[1], \ &ar_types[j], \ (AR_DATA *)&cool_ints[1], \ &ar_types[k]); \ \ if ((act_status[k] ^ test_status[k]) & \ AR_STAT_INVALID_TYPE) \ { \ printf(" ERROR: incorrect status at %d,%d\n", j, k); \ abort(); \ } \ } \ } \ \ printf("PASSED\n"); \ } while (0)
Definition at line 3412 of file testint.c.
Referenced by test_negate().
#define TEST_NEG_OP_UNSIGNED | ( | size | ) |
Definition at line 3372 of file testint.c.
Referenced by test_negate().
#define TEST_SHIFT_OP_SIGNED | ( | size, | |
max_shift, | |||
opr, | |||
func | |||
) |
Definition at line 1293 of file testint.c.
Referenced by test_shiftl(), and test_shiftr().
#define TEST_SHIFT_OP_TYPES | ( | opr, | |
func | |||
) |
Definition at line 1415 of file testint.c.
Referenced by test_shiftl(), and test_shiftr().
#define TEST_SHIFT_OP_UNSIGNED | ( | size, | |
max_shift, | |||
opr, | |||
func | |||
) |
Definition at line 1360 of file testint.c.
Referenced by test_shiftl(), and test_shiftr().
#define TEST_STATUS_SIGNED | ( | size | ) |
do { \ int j; \ \ printf(" Testing: SIGNED %2d INT %-10s: ", size, "status"); \ \ for (j=0; j<num_cool_ints; j++) \ { \ act_status[j] = is_zero##size( \ DSEXT##size(LS##size(&cool_ints[j]))) \ ? AR_STAT_ZERO : AR_STAT_OK; \ \ if (is_neg##size(LS##size(&cool_ints[j]))) \ act_status[j] |= AR_STAT_NEGATIVE; \ \ test_status[j] = AR_status((AR_DATA *)&cool_ints[j], \ &sint##size##_artype); \ \ if (act_status[j] != test_status[j]) \ { \ printf(" ERROR: incorrect status at %d\n", j); \ abort(); \ } \ } \ \ printf("PASSED\n"); \ } while (0)
Definition at line 3003 of file testint.c.
Referenced by test_arstatus().
#define TEST_STATUS_TYPES |
do { \ int k; \ \ printf(" Testing: types %-10s: ", "status"); \ \ for (k=0; k<num_ar_types; k++) \ { \ test_status[k] = AR_status((AR_DATA *)&cool_ints[1], \ &ar_types[k]); \ \ if (test_status[k] & AR_STAT_INVALID_TYPE) \ { \ printf(" ERROR: incorrect status at %d\n", k); \ abort(); \ } \ } \ \ printf("PASSED\n"); \ } while (0)
Definition at line 3057 of file testint.c.
Referenced by test_arstatus().
#define TEST_STATUS_UNSIGNED | ( | size | ) |
do { \ int j; \ \ printf(" Testing: SIGNED %2d INT %-10s: ", size, "status"); \ \ for (j=0; j<num_cool_ints; j++) \ { \ act_status[j] = is_zero##size(LU##size(&cool_ints[j])) \ ? AR_STAT_ZERO : AR_STAT_OK; \ \ test_status[j] = AR_status((AR_DATA *)&cool_ints[j], \ &uint##size##_artype); \ \ if (act_status[j] != test_status[j]) \ { \ printf(" ERROR: incorrect status at %d\n", j); \ abort(); \ } \ } \ \ printf("PASSED\n"); \ } while (0)
Definition at line 3032 of file testint.c.
Referenced by test_arstatus().
#define TEST_UNARY_BIT_OP_SIGNED | ( | size, | |
opr, | |||
func | |||
) |
Definition at line 1074 of file testint.c.
Referenced by test_bitcomplement().
#define TEST_UNARY_BIT_OP_TYPES | ( | opr, | |
func | |||
) |
do { \ int j, k; \ \ printf(" Testing: types %-10s: ", #opr); \ \ for (j=0; j<num_ar_types; j++) \ { \ for (k=0; k<num_ar_types; k++) \ { \ act_status[k] = AR_STAT_OK; \ if (ar_types[j] != ar_types[k] || \ !IS_SUPPORTED_INT_TYPE(ar_types[j])) \ act_status[k] = AR_STAT_INVALID_TYPE; \ \ test_status[k] = func((AR_DATA *)&test_result[1], \ &ar_types[j], \ (AR_DATA *)&cool_ints[1], \ &ar_types[k]); \ \ if ((act_status[k] ^ test_status[k]) & \ AR_STAT_INVALID_TYPE) \ { \ printf(" ERROR: incorrect status at %d,%d\n", j, k); \ abort(); \ } \ } \ } \ \ printf("PASSED\n"); \ } while (0)
Definition at line 1158 of file testint.c.
Referenced by test_bitcomplement().
#define TEST_UNARY_BIT_OP_UNSIGNED | ( | size, | |
opr, | |||
func | |||
) |
Definition at line 1117 of file testint.c.
Referenced by test_bitcomplement().
static SINT64 _dshiftl16 | ( | SINT64 | op1, |
SINT64 | op2, | ||
SINT64 | shcnt | ||
) | [static] |
static SINT64 _dshiftl32 | ( | SINT64 | op1, |
SINT64 | op2, | ||
SINT64 | shcnt | ||
) | [static] |
static SINT64 _dshiftl46 | ( | SINT64 | op1, |
SINT64 | op2, | ||
SINT64 | shcnt | ||
) | [static] |
Definition at line 809 of file testint.c.
References _dshiftl().
static SINT64 _dshiftl64 | ( | SINT64 | op1, |
SINT64 | op2, | ||
SINT64 | shcnt | ||
) | [static] |
Definition at line 872 of file testint.c.
References _dshiftl().
static SINT64 _dshiftl8 | ( | SINT64 | op1, |
SINT64 | op2, | ||
SINT64 | shcnt | ||
) | [static] |
static SINT64 _dshiftr16 | ( | SINT64 | op1, |
SINT64 | op2, | ||
SINT64 | shcnt | ||
) | [static] |
static SINT64 _dshiftr32 | ( | SINT64 | op1, |
SINT64 | op2, | ||
SINT64 | shcnt | ||
) | [static] |
static SINT64 _dshiftr46 | ( | SINT64 | op1, |
SINT64 | op2, | ||
SINT64 | shcnt | ||
) | [static] |
Definition at line 814 of file testint.c.
References _dshiftr().
static SINT64 _dshiftr64 | ( | SINT64 | op1, |
SINT64 | op2, | ||
SINT64 | shcnt | ||
) | [static] |
Definition at line 877 of file testint.c.
References _dshiftr().
static SINT64 _dshiftr8 | ( | SINT64 | op1, |
SINT64 | op2, | ||
SINT64 | shcnt | ||
) | [static] |
static SINT64 _leadz46 | ( | SINT64 | val | ) | [static] |
static SINT64 _leadz64 | ( | SINT64 | val | ) | [static] |
static SINT64 _mask46 | ( | SINT64 | bits | ) | [static] |
static SINT64 _mask64 | ( | SINT64 | bits | ) | [static] |
static SINT64 _popcnt16 | ( | SINT64 | val | ) | [static] |
static SINT64 _popcnt32 | ( | SINT64 | val | ) | [static] |
static SINT64 _popcnt8 | ( | SINT64 | val | ) | [static] |
static SINT64 _poppar16 | ( | SINT64 | val | ) | [static] |
Definition at line 671 of file testint.c.
References _popcnt16().
static SINT64 _poppar32 | ( | SINT64 | val | ) | [static] |
Definition at line 771 of file testint.c.
References _popcnt32().
static SINT64 _poppar8 | ( | SINT64 | val | ) | [static] |
Definition at line 571 of file testint.c.
References _popcnt8().
SINT64 DSEXT16 | ( | SINT64 | v | ) |
Definition at line 586 of file testint.c.
Referenced by SEXT16(), test_ishft_signed(), and test_ishftc_signed().
SINT64 DSEXT32 | ( | SINT64 | v | ) |
Definition at line 686 of file testint.c.
Referenced by SEXT32(), test_ishft_signed(), and test_ishftc_signed().
SINT64 DSEXT64 | ( | SINT64 | v | ) |
Definition at line 850 of file testint.c.
Referenced by test_ishft_signed(), and test_ishftc_signed().
SINT64 DSEXT8 | ( | SINT64 | v | ) |
Definition at line 486 of file testint.c.
Referenced by SEXT8(), test_ishft_signed(), and test_ishftc_signed().
Definition at line 600 of file testint.c.
References AR_INT_64::part4, and SEXT16().
Referenced by test_ibits_signed(), test_ishft_signed(), and test_ishftc_signed().
Definition at line 700 of file testint.c.
References AR_INT_64::part3, AR_INT_64::part4, and SEXT32().
Referenced by test_ibits_signed(), test_ishft_signed(), and test_ishftc_signed().
Definition at line 500 of file testint.c.
References AR_INT_64::part4, and SEXT8().
Referenced by test_ibits_signed(), test_ishft_signed(), and test_ishftc_signed().
Definition at line 605 of file testint.c.
References AR_INT_64::part4.
Referenced by test_ibits_signed(), test_ishft_signed(), and test_ishftc_signed().
Definition at line 705 of file testint.c.
References AR_INT_64::part3, and AR_INT_64::part4.
Referenced by test_ibits_signed(), test_ishft_signed(), and test_ishftc_signed().
Definition at line 505 of file testint.c.
References AR_INT_64::part4.
Referenced by test_ibits_signed(), test_ishft_signed(), and test_ishftc_signed().
main | ( | ) |
Definition at line 903 of file testint.c.
References exit(), test_abs(), test_add(), test_arstatus(), test_bitand(), test_bitcomplement(), test_bitor(), test_bitxor(), test_compare(), test_divide(), test_dshiftl(), test_dshiftr(), test_ibits(), test_ishft(), test_ishftc(), test_leadz(), test_mask(), test_modulo(), test_multiply(), test_negate(), test_popcnt(), test_poppar(), test_shiftl(), test_shiftr(), and test_subtract().
SINT64 SEXT16 | ( | SINT64 | v | ) |
SINT64 SEXT32 | ( | SINT64 | v | ) |
SINT64 SEXT8 | ( | SINT64 | v | ) |
test_abs | ( | ) |
Definition at line 3594 of file testint.c.
References TEST_ABS_OP_SIGNED, TEST_ABS_OP_TYPES, and TEST_ABS_OP_UNSIGNED.
Referenced by main().
test_add | ( | ) |
Definition at line 3262 of file testint.c.
References AR_add(), TEST_ADDSUB_OP_SIGNED, TEST_ADDSUB_OP_TYPES, and TEST_ADDSUB_OP_UNSIGNED.
Referenced by main().
test_arstatus | ( | ) |
Definition at line 3079 of file testint.c.
References TEST_STATUS_SIGNED, TEST_STATUS_TYPES, and TEST_STATUS_UNSIGNED.
Referenced by main().
test_bitand | ( | ) |
Definition at line 1213 of file testint.c.
References AR_bitand(), TEST_BINARY_BIT_OP_SIGNED, TEST_BINARY_BIT_OP_TYPES, and TEST_BINARY_BIT_OP_UNSIGNED.
Referenced by main().
Definition at line 1257 of file testint.c.
References AR_bitcomplement(), TEST_UNARY_BIT_OP_SIGNED, TEST_UNARY_BIT_OP_TYPES, and TEST_UNARY_BIT_OP_UNSIGNED.
Referenced by main().
test_bitor | ( | ) |
Definition at line 1191 of file testint.c.
References AR_bitor(), TEST_BINARY_BIT_OP_SIGNED, TEST_BINARY_BIT_OP_TYPES, and TEST_BINARY_BIT_OP_UNSIGNED.
Referenced by main().
test_bitxor | ( | ) |
Definition at line 1235 of file testint.c.
References AR_bitxor(), TEST_BINARY_BIT_OP_SIGNED, TEST_BINARY_BIT_OP_TYPES, and TEST_BINARY_BIT_OP_UNSIGNED.
Referenced by main().
test_compare | ( | ) |
Definition at line 4368 of file testint.c.
References TEST_COMPARE_OP_SIGNED, and TEST_COMPARE_OP_UNSIGNED.
Referenced by main().
test_divide | ( | ) |
Definition at line 4031 of file testint.c.
References TEST_DIV_OP_SIGNED, and TEST_DIV_OP_UNSIGNED.
Referenced by main().
test_dshiftl | ( | ) |
Definition at line 1681 of file testint.c.
References _dshiftl(), TEST_DSHIFT_OP_SIGNED, TEST_DSHIFT_OP_TYPES, and TEST_DSHIFT_OP_UNSIGNED.
Referenced by main().
test_dshiftr | ( | ) |
Definition at line 1703 of file testint.c.
References _dshiftr(), TEST_DSHIFT_OP_SIGNED, TEST_DSHIFT_OP_TYPES, and TEST_DSHIFT_OP_UNSIGNED.
Referenced by main().
test_ibits | ( | ) |
Definition at line 2628 of file testint.c.
References test_ibits_signed(), and TEST_IBITS_TYPES.
Referenced by main().
static void test_ibits_signed | ( | int | size | ) | [static] |
Definition at line 2351 of file testint.c.
References _mask(), ar_data::ar_i8, AR_ibits(), AR_STAT_NEGATIVE, AR_STAT_OK, AR_STAT_UNDEFINED, AR_STAT_ZERO, is_neg16, is_neg32, is_neg64, is_neg8, is_zero16, is_zero32, is_zero64, is_zero8, LS16(), LS32(), LS8(), LU16(), LU32(), LU8(), MASKR, num_cool_ints, AR_INT_64::part1, AR_INT_64::part2, AR_INT_64::part3, AR_INT_64::part4, AR_INT_8_64::part5, ZERO_INT16_UPPER, ZERO_INT32_UPPER, and ZERO_INT8_UPPER.
Referenced by test_ibits().
test_ishft | ( | ) |
Definition at line 1949 of file testint.c.
References test_ishft_signed(), and TEST_ISHFT_TYPES.
Referenced by main().
static void test_ishft_signed | ( | int | size | ) | [static] |
Definition at line 1732 of file testint.c.
References AR_ishft(), AR_STAT_NEGATIVE, AR_STAT_OK, AR_STAT_UNDEFINED, AR_STAT_ZERO, DSEXT16(), DSEXT32(), DSEXT64(), DSEXT8(), is_neg16, is_neg32, is_neg64, is_neg8, is_zero16, is_zero32, is_zero64, is_zero8, LS16(), LS32(), LS8(), LU16(), LU32(), LU8(), num_cool_ints, AR_INT_64::part1, AR_INT_64::part2, AR_INT_64::part3, and AR_INT_64::part4.
Referenced by test_ishft().
test_ishftc | ( | ) |
Definition at line 2322 of file testint.c.
References test_ishftc_signed(), and TEST_ISHFTC_TYPES.
Referenced by main().
static void test_ishftc_signed | ( | int | size | ) | [static] |
Definition at line 1972 of file testint.c.
References _mask(), ar_data::ar_i8, AR_ishftc(), AR_STAT_NEGATIVE, AR_STAT_OK, AR_STAT_UNDEFINED, AR_STAT_ZERO, DSEXT16(), DSEXT32(), DSEXT64(), DSEXT8(), is_neg16, is_neg32, is_neg64, is_neg8, is_zero16, is_zero32, is_zero64, is_zero8, LS16(), LS32(), LS8(), LU16(), LU32(), LU8(), MASKL, num_cool_ints, AR_INT_64::part1, AR_INT_64::part2, AR_INT_64::part3, AR_INT_64::part4, AR_INT_8_64::part5, ZERO_INT16_UPPER, ZERO_INT32_UPPER, and ZERO_INT8_UPPER.
Referenced by test_ishftc().
test_leadz | ( | ) |
Definition at line 2923 of file testint.c.
References _leadz(), AR_leadz(), TEST_LP_OP_SIGNED, TEST_LP_OP_TYPES, and TEST_LP_OP_UNSIGNED.
Referenced by main().
test_mask | ( | ) |
Definition at line 2901 of file testint.c.
References TEST_MASK_OP_SIGNED, TEST_MASK_OP_TYPES, and TEST_MASK_OP_UNSIGNED.
Referenced by main().
test_modulo | ( | ) |
Definition at line 4219 of file testint.c.
References TEST_MOD_OP_SIGNED, TEST_MOD_OP_TYPES, and TEST_MOD_OP_UNSIGNED.
Referenced by main().
test_multiply | ( | ) |
Definition at line 3804 of file testint.c.
References TEST_MUL_OP_SIGNED, and TEST_MUL_OP_UNSIGNED.
Referenced by main().
test_negate | ( | ) |
Definition at line 3445 of file testint.c.
References TEST_NEG_OP_SIGNED, TEST_NEG_OP_TYPES, and TEST_NEG_OP_UNSIGNED.
Referenced by main().
test_popcnt | ( | ) |
Definition at line 2945 of file testint.c.
References AR_popcnt(), TEST_LP_OP_SIGNED, TEST_LP_OP_TYPES, and TEST_LP_OP_UNSIGNED.
Referenced by main().
test_poppar | ( | ) |
Definition at line 2967 of file testint.c.
References AR_poppar(), TEST_LP_OP_SIGNED, TEST_LP_OP_TYPES, and TEST_LP_OP_UNSIGNED.
Referenced by main().
test_shiftl | ( | ) |
Definition at line 1454 of file testint.c.
References AR_shiftl(), TEST_SHIFT_OP_SIGNED, TEST_SHIFT_OP_TYPES, and TEST_SHIFT_OP_UNSIGNED.
Referenced by main().
test_shiftr | ( | ) |
Definition at line 1476 of file testint.c.
References AR_shiftr(), TEST_SHIFT_OP_SIGNED, TEST_SHIFT_OP_TYPES, and TEST_SHIFT_OP_UNSIGNED.
Referenced by main().
test_subtract | ( | ) |
Definition at line 3284 of file testint.c.
References AR_subtract(), TEST_ADDSUB_OP_SIGNED, TEST_ADDSUB_OP_TYPES, and TEST_ADDSUB_OP_UNSIGNED.
Referenced by main().
SINT64 act_result[sizeof(cool_ints)/sizeof(AR_INT_64)] |
int act_status[sizeof(cool_ints)/sizeof(AR_INT_64)] |
{ {0x0000, 0x0000, 0x0000, 0x0000}, {0x0000, 0x0000, 0x0000, 0x0001}, {0x0000, 0x0000, 0x0000, 0x000a}, {0x0000, 0x0000, 0x0000, 0x0010}, {0x0000, 0x0000, 0x0000, 0x0015}, {0x0000, 0x0000, 0x0000, 0x001f}, {0x0000, 0x0000, 0x0000, 0x0020}, {0x0000, 0x0000, 0x0000, 0x0021}, {0x0000, 0x0000, 0x0000, 0x002b}, {0x0000, 0x0000, 0x0000, 0x003f}, {0x0000, 0x0000, 0x0000, 0x0040}, {0x0000, 0x0000, 0x0000, 0x0041}, {0xffff, 0xffff, 0xffff, 0xffff} }
int num_ar_types = sizeof(ar_types) / sizeof(AR_TYPE) |
int num_cool_ints = sizeof(cool_ints)/sizeof(AR_INT_64) |
Definition at line 306 of file testint.c.
Referenced by test_ibits_signed(), test_ishft_signed(), and test_ishftc_signed().
int num_dshift_vals = sizeof(dshift_vals)/sizeof(AR_INT_64) |
Definition at line 360 of file testint.c.
Referenced by AR_compare().
AR_INT_64 test_result[sizeof(cool_ints)/sizeof(AR_INT_64)] |
int test_status[sizeof(cool_ints)/sizeof(AR_INT_64)] |
Definition at line 358 of file testint.c.
Referenced by ar_multiply_integer().
Definition at line 361 of file testint.c.
Referenced by ar_multiply_integer().