9 #define test32_1 0x001200AB
10 #define test32_2 0x00341500
15 myint test_add(myint a, myint b) {
19 myint test_addi(myint a) {
23 myint test_sub(myint a, myint b) {
27 myint test_subi(myint a) {
31 myint test_subfi(myint a) {
35 myint test_mul(myint a, myint b) {
39 myint test_muli(myint a) {
43 myint test_div(myint a, myint b) {
47 myint test_divi(myint a) {
51 myint test_shl(myint a, myint b) {
55 myint test_shli(myint a) {
59 myint test_shr(myint a, myint b) {
63 myint test_shri(myint a) {
67 myint test_cmp(myint a, myint b) {
71 myint test_cmpi(myint a) {
72 return (a>IMM) ? 1 : 0;
75 int main(int argc, char *argv[]) {
80 res16[ 0] = test_add (test16_1, test16_2);
81 res16[ 1] = test_sub (test16_1, test16_2);
82 res16[ 2] = test_mul (test16_1, test16_2);
83 res16[ 3] = test_div (test16_1, test16_2);
84 res16[ 4] = test_shl (test16_1, test16_2);
85 res16[ 5] = test_shr (test16_1, test16_2);
86 res16[ 6] = test_div (test16_1, test16_2);
87 res16[ 7] = test_cmp (test16_1, test16_2);
88 res16[ 8] = test_addi (test16_1);
89 res16[ 9] = test_subi (test16_1);
90 res16[10] = test_subfi(test16_1);
91 res16[11] = test_muli (test16_1);
92 res16[12] = test_divi (test16_1);
93 res16[13] = test_shli (test16_1);
94 res16[14] = test_shri (test16_1);
95 res16[15] = test_cmpi (test16_1);
97 res32[ 0] = test_add (test32_1, test32_2);
98 res32[ 1] = test_sub (test32_1, test32_2);
99 res32[ 2] = test_mul (test32_1, test32_2);
100 res32[ 3] = test_div (test32_1, test32_2);
101 res32[ 4] = test_shl (test32_1, test32_s);
102 res32[ 5] = test_shr (test32_1, test32_s);
103 res32[ 6] = test_div (test32_1, test32_2);
104 res32[ 7] = test_cmp (test32_1, test32_2);
105 res32[ 8] = test_addi (test32_1);
106 res32[ 9] = test_subi (test32_1);
107 res32[10] = test_subfi(test32_1);
108 res32[11] = test_muli (test32_1);
109 res32[12] = test_divi (test32_1);
110 res32[13] = test_shli (test32_1);
111 res32[14] = test_shri (test32_1);
112 res32[15] = test_cmpi (test32_1);
114 for (i=0; i<TESTANZ; i++) {
115 printf("res16[%d] = %d\n", i, res16[i]);
116 printf("res32[%d] = %d\n", i, res32[i]);