1#include <stdio.h>
2#include "insert.h"
3#include "opcodes.h"
4
5#define iihh(r1,i2)  ".long 0xa5" #r1 "0" #i2 "\n\t"
6#define iihl(r1,i2)  ".long 0xa5" #r1 "1" #i2 "\n\t"
7#define iilh(r1,i2)  ".long 0xa5" #r1 "2" #i2 "\n\t"
8#define iill(r1,i2)  ".long 0xa5" #r1 "3" #i2 "\n\t"
9
10static void do_imm_insns(void)
11{
12	immsweep(iihh, 0055);
13	immsweep(iihl, 0055);
14	immsweep(iilh, 0055);
15	immsweep(iill, 0055);
16	immsweep(iihh, 00aa);
17	immsweep(iihl, 00aa);
18	immsweep(iilh, 00aa);
19	immsweep(iill, 00aa);
20	immsweep(iihh, 00ff);
21	immsweep(iihl, 00ff);
22	immsweep(iilh, 00ff);
23	immsweep(iill, 00ff);
24	immsweep(iihh, 0000);
25	immsweep(iihl, 0000);
26	immsweep(iilh, 0000);
27	immsweep(iill, 0000);
28	immsweep(iihh, ffff);
29	immsweep(iihl, ffff);
30	immsweep(iilh, ffff);
31	immsweep(iill, ffff);
32	immsweep(iihh, aaaa);
33	immsweep(iihl, aaaa);
34	immsweep(iilh, aaaa);
35	immsweep(iill, aaaa);
36	immsweep(iihh, 5555);
37	immsweep(iihl, 5555);
38	immsweep(iilh, 5555);
39	immsweep(iill, 5555);
40}
41
42
43static void do_mem_insns(unsigned long s2)
44{
45	memsweep(ic, s2);
46	icysweep(s2);
47}
48
49int main()
50{
51	do_mem_insns(0x0ul);
52	do_mem_insns(0x5555555555555555ul);
53	do_mem_insns(0xaaaaaaaaaaaaaaaaul);
54	do_mem_insns(0x8000000000000000ul);
55	do_mem_insns(0xfffffffffffffffful);
56	do_mem_insns(0x7fffffff00000000ul);
57	do_mem_insns(0x8000000000000000ul);
58	do_mem_insns(0xaaaaaaaa00000000ul);
59	do_mem_insns(0xffffffff00000000ul);
60	do_mem_insns(0x000000007ffffffful);
61	do_mem_insns(0x0000000080000000ul);
62	do_mem_insns(0x0000000055555555ul);
63	do_mem_insns(0x00000000fffffffful);
64	do_mem_insns(0x000000000000fffful);
65	do_mem_insns(0x0000000000007ffful);
66	do_mem_insns(0x0000000000008000ul);
67	do_mem_insns(0x000000000000fffful);
68
69	do_imm_insns();
70	return 0;
71}
72