Home | History | Annotate | Download | only in s390x
      1 #include <stdio.h>
      2 #include "or.h"
      3 #include "opcodes.h"
      4 
      5 #define oihh(r1,i2)  ".long 0xa5" #r1 "8" #i2 "\n\t"
      6 #define oihl(r1,i2)  ".long 0xa5" #r1 "9" #i2 "\n\t"
      7 #define oilh(r1,i2)  ".long 0xa5" #r1 "a" #i2 "\n\t"
      8 #define oill(r1,i2)  ".long 0xa5" #r1 "b" #i2 "\n\t"
      9 
     10 static void do_imm_insns(void)
     11 {
     12 	memimmsweep(oi, 0);
     13 	memimmsweep(oi, 255);
     14 	memimmsweep(oi, 128);
     15 	memimmsweep(oi, 0xaa);
     16 	memimmsweep(oi, 0x55);
     17 	oiysweep(00);
     18 	oiysweep(ff);
     19 	oiysweep(80);
     20 	oiysweep(aa);
     21 	oiysweep(55);
     22 	immsweep(oihh, 0055);
     23 	immsweep(oihl, 0055);
     24 	immsweep(oilh, 0055);
     25 	immsweep(oill, 0055);
     26 	immsweep(oihh, 00aa);
     27 	immsweep(oihl, 00aa);
     28 	immsweep(oilh, 00aa);
     29 	immsweep(oill, 00aa);
     30 	immsweep(oihh, 00ff);
     31 	immsweep(oihl, 00ff);
     32 	immsweep(oilh, 00ff);
     33 	immsweep(oill, 00ff);
     34 	immsweep(oihh, 0000);
     35 	immsweep(oihl, 0000);
     36 	immsweep(oilh, 0000);
     37 	immsweep(oill, 0000);
     38 	immsweep(oihh, ffff);
     39 	immsweep(oihl, ffff);
     40 	immsweep(oilh, ffff);
     41 	immsweep(oill, ffff);
     42 	immsweep(oihh, aaaa);
     43 	immsweep(oihl, aaaa);
     44 	immsweep(oilh, aaaa);
     45 	immsweep(oill, aaaa);
     46 	immsweep(oihh, 5555);
     47 	immsweep(oihl, 5555);
     48 	immsweep(oilh, 5555);
     49 	immsweep(oill, 5555);
     50 }
     51 
     52 
     53 static void do_regmem_insns(unsigned long s2)
     54 {
     55 	memsweep(o, s2);
     56 	memsweep(og, s2);
     57 	regsweep(or, s2);
     58 	regsweep(ogr, s2);
     59 	oysweep(s2);
     60 }
     61 
     62 int main()
     63 {
     64 	do_regmem_insns(0x0ul);
     65 	do_regmem_insns(0x5555555555555555ul);
     66 	do_regmem_insns(0xaaaaaaaaaaaaaaaaul);
     67 	do_regmem_insns(0x8000000000000000ul);
     68 	do_regmem_insns(0xfffffffffffffffful);
     69 	do_regmem_insns(0x7fffffff00000000ul);
     70 	do_regmem_insns(0x8000000000000000ul);
     71 	do_regmem_insns(0xaaaaaaaa00000000ul);
     72 	do_regmem_insns(0xffffffff00000000ul);
     73 	do_regmem_insns(0x000000007ffffffful);
     74 	do_regmem_insns(0x0000000080000000ul);
     75 	do_regmem_insns(0x0000000055555555ul);
     76 	do_regmem_insns(0x00000000fffffffful);
     77 	do_regmem_insns(0x000000000000fffful);
     78 	do_regmem_insns(0x0000000000007ffful);
     79 	do_regmem_insns(0x0000000000008000ul);
     80 	do_regmem_insns(0x000000000000fffful);
     81 
     82 	do_imm_insns();
     83 
     84 	return 0;
     85 }
     86