9 #define test32_1 0x001200AB
10 #define test32_2 0x00341500
14 myint test_add(myint a, myint b) {
18 myint test_addi(myint a) {
22 myint test_sub(myint a, myint b) {
26 myint test_subi(myint a) {
30 myint test_subfi(myint a) {
34 myint test_mul(myint a, myint b) {
38 myint test_muli(myint a) {
42 myint test_div(myint a, myint b) {
46 myint test_divi(myint a) {
50 myint test_shl(myint a, myint b) {
54 myint test_shli(myint a) {
58 myint test_shr(myint a, myint b) {
62 myint test_shri(myint a) {
66 myint test_cmp(myint a, myint b) {
70 myint test_cmpi(myint a) {
71 return (a>IMM) ? 1 : 0;
74 int main(int argc, char *argv[]) {
79 res16[ 0] = test_add (test16_1, test16_2);
80 res16[ 1] = test_sub (test16_1, test16_2);
81 res16[ 2] = test_mul (test16_1, test16_2);
82 res16[ 3] = test_div (test16_1, test16_2);
83 res16[ 4] = test_shl (test16_1, test16_2);
84 res16[ 5] = test_shr (test16_1, test16_2);
85 res16[ 6] = test_div (test16_1, test16_2);
86 res16[ 7] = test_cmp (test16_1, test16_2);
87 res16[ 8] = test_addi (test16_1);
88 res16[ 9] = test_subi (test16_1);
89 res16[10] = test_subfi(test16_1);
90 res16[11] = test_muli (test16_1);
91 res16[12] = test_divi (test16_1);
92 res16[13] = test_shli (test16_1);
93 res16[14] = test_shri (test16_1);
94 res16[15] = test_cmpi (test16_1);
96 res32[ 0] = test_add (test32_1, test32_2);
97 res32[ 1] = test_sub (test32_1, test32_2);
98 res32[ 2] = test_mul (test32_1, test32_2);
99 res32[ 3] = test_div (test32_1, test32_2);
100 res32[ 4] = test_shl (test32_1, test32_2);
101 res32[ 5] = test_shr (test32_1, test32_2);
102 res32[ 6] = test_div (test32_1, test32_2);
103 res32[ 7] = test_cmp (test32_1, test32_2);
104 res32[ 8] = test_addi (test32_1);
105 res32[ 9] = test_subi (test32_1);
106 res32[10] = test_subfi(test32_1);
107 res32[11] = test_muli (test32_1);
108 res32[12] = test_divi (test32_1);
109 res32[13] = test_shli (test32_1);
110 res32[14] = test_shri (test32_1);
111 res32[15] = test_cmpi (test32_1);
113 for (i=0; i<TESTANZ; i++) {
114 printf("res16[%d] = %d\n", i, res16[i]);
115 printf("res32[%d] = %d\n", i, res32[i]);