Line 92... |
Line 92... |
int j;
|
int j;
|
|
|
for(j = i; j < 35; j++) {
|
for(j = i; j < 35; j++) {
|
shl += 1 << j;
|
shl += 1 << j;
|
#if 0
|
#if 0
|
PRINTF("%u. shl:%.8lx", j, shl);
|
printf("%u. shl:%.8lx", j, shl);
|
report(shl);
|
report(shl);
|
#endif
|
#endif
|
shr += 0x80000000 >> j;
|
shr += 0x80000000 >> j;
|
#if 0
|
#if 0
|
PRINTF(" shr:%.8lx", shr);
|
printf(" shr:%.8lx", shr);
|
report(shr);
|
report(shr);
|
#endif
|
#endif
|
bit += ((~j ^ 0x11223344) & 0x33557788) + (j | 0x11223344);
|
bit += ((~j ^ 0x11223344) & 0x33557788) + (j | 0x11223344);
|
#if 0
|
#if 0
|
PRINTF(" bit:%.8lx\n", bit);
|
printf(" bit:%.8lx\n", bit);
|
report(bit);
|
report(bit);
|
#endif
|
#endif
|
}
|
}
|
|
|
return (shl + shr + bit);
|
return (shl + shr + bit);
|
Line 131... |
Line 131... |
us = i;
|
us = i;
|
ss = i;
|
ss = i;
|
ul = i;
|
ul = i;
|
sl = i;
|
sl = i;
|
#if 0
|
#if 0
|
PRINTF("%u. i:%.8lx ", j, i);
|
printf("%u. i:%.8lx ", j, i);
|
PRINTF("uc:%.8lx sc:%.8lx ", uc, sc);
|
printf("uc:%.8lx sc:%.8lx ", uc, sc);
|
report(uc);
|
report(uc);
|
report(sc);
|
report(sc);
|
PRINTF("us:%.8lx ss:%.8lx ", us, ss);
|
printf("us:%.8lx ss:%.8lx ", us, ss);
|
report(us);
|
report(us);
|
report(ss);
|
report(ss);
|
PRINTF("ul:%.8lx sl:%.8lx\n", ul, sl);
|
printf("ul:%.8lx sl:%.8lx\n", ul, sl);
|
report(ul);
|
report(ul);
|
report(sl);
|
report(sl);
|
#endif
|
#endif
|
i = uc + sc + us + ss + ul + sl;
|
i = uc + sc + us + ss + ul + sl;
|
}
|
}
|
Line 176... |
Line 176... |
signed long result1 = 0;
|
signed long result1 = 0;
|
signed long result2 = 0;
|
signed long result2 = 0;
|
signed long result3 = 0;
|
signed long result3 = 0;
|
|
|
#if DEBUG
|
#if DEBUG
|
PRINTF("Start...\n");
|
printf("Start...\n");
|
#endif
|
#endif
|
result1 = test_cond(1);
|
result1 = test_cond(1);
|
result2 = test_cond(-1);
|
result2 = test_cond(-1);
|
result3 -= result1 + result2;
|
result3 -= result1 + result2;
|
report(result2);
|
report(result2);
|
#if DEBUG
|
#if DEBUG
|
PRINTF("After test_cond: 0x%.8lx 0x%.8lx\n", result1, result2);
|
printf("After test_cond: 0x%.8lx 0x%.8lx\n", result1, result2);
|
#endif
|
#endif
|
|
|
result1 = test_loops(1);
|
result1 = test_loops(1);
|
result2 = test_loops(-1);
|
result2 = test_loops(-1);
|
result3 -= result1 + result2;
|
result3 -= result1 + result2;
|
report(result2);
|
report(result2);
|
#if DEBUG
|
#if DEBUG
|
PRINTF("After test_loops: 0x%.8lx 0x%.8lx\n", result1, result2);
|
printf("After test_loops: 0x%.8lx 0x%.8lx\n", result1, result2);
|
#endif
|
#endif
|
|
|
result1 = test_arith(1);
|
result1 = test_arith(1);
|
result2 = test_arith(-1);
|
result2 = test_arith(-1);
|
result3 -= result1 + result2;
|
result3 -= result1 + result2;
|
report(result2);
|
report(result2);
|
#if DEBUG
|
#if DEBUG
|
PRINTF("After test_arith: 0x%.8lx 0x%.8lx\n", result1, result2);
|
printf("After test_arith: 0x%.8lx 0x%.8lx\n", result1, result2);
|
#endif
|
#endif
|
|
|
result1 = test_bitop(1);
|
result1 = test_bitop(1);
|
result2 = test_bitop(-1);
|
result2 = test_bitop(-1);
|
result3 -= result1 + result2;
|
result3 -= result1 + result2;
|
report(result2);
|
report(result2);
|
#if DEBUG
|
#if DEBUG
|
PRINTF("After test_bitop: 0x%.8lx 0x%.8lx\n", result1, result2);
|
printf("After test_bitop: 0x%.8lx 0x%.8lx\n", result1, result2);
|
#endif
|
#endif
|
|
|
result1 = test_types(1);
|
result1 = test_types(1);
|
result2 = test_types(-1);
|
result2 = test_types(-1);
|
result3 -= result1 + result2;
|
result3 -= result1 + result2;
|
report(result2);
|
report(result2);
|
#if DEBUG
|
#if DEBUG
|
PRINTF("After test_types: 0x%.8lx 0x%.8lx\n", result1, result2);
|
printf("After test_types: 0x%.8lx 0x%.8lx\n", result1, result2);
|
#endif
|
#endif
|
result1 = test_array(1);
|
result1 = test_array(1);
|
result2 = test_array(-1);
|
result2 = test_array(-1);
|
result3 -= result1 + result2;
|
result3 -= result1 + result2;
|
report(result2);
|
report(result2);
|
#if DEBUG
|
#if DEBUG
|
PRINTF("After test_array: 0x%.8lx 0x%.8lx\n", result1, result2);
|
printf("After test_array: 0x%.8lx 0x%.8lx\n", result1, result2);
|
#endif
|
#endif
|
|
|
#ifdef XXX
|
#ifdef XXX
|
#warning xxx
|
#warning xxx
|
#endif
|
#endif
|
|
|
PRINTF("RESULT: %.8lx\n", result3 ^ 0x4bad2569 ^ 0xdeaddead);
|
printf("RESULT: %.8lx\n", result3 ^ 0x4bad2569 ^ 0xdeaddead);
|
report(result3 ^ 0x4bad2569 ^ 0xdeaddead);
|
report(result3 ^ 0x4bad2569 ^ 0xdeaddead);
|
|
|
exit(0);
|
exit(0);
|
}
|
}
|
|
|
No newline at end of file
|
No newline at end of file
|