b5ac0185adba82ad8424401a50807f63ecb383ea
4 #include "operators_test.h"
18 #define operator_check( op ) { \
22 uint16_t z1 = x1 op y1; \
24 printf("FAILED %s %d %d %d %d\n", \
25 xstr(op), i, j, z, z1); \
28 int main(int argc
, char *argv
[])
30 /*op2<uint16_t, uint16_t, uint32_t> o(0xfff0);
31 uint32_t p = 0xfffffef;
34 opcvt
cvt(u64_u64_cvt
, u64_u64_cvt
, sext32
);
36 uint64_t s1
= 0x1ff01;
37 uint64_t s2
= 0x2ff01;
39 //printf("hello %lx\n", o);
44 for (int i
=0, x
=0; i
< 256; i
++, x
++) {
45 //printf("hello %x\n", (int)(uint8_t)x);
46 for (int j
, y
=0; j
< 255; j
++, y
++) {
47 operator_check( plus
)
48 operator_check( minus
)
49 operator_check( divide
)
50 operator_check( remainder
)
51 operator_check( shiftr
)
52 operator_check( shiftl
)