4 #define DO_RXSBG(insn, _r1, _r2, i3, i4, i5) \
6 register unsigned long r1 asm ("1") = _r1; \
7 register unsigned long r2 asm ("2") = _r2; \
9 asm volatile( "clgr 1,2\n" \
10 insn(1,2, i3, i4, i5) \
13 : "+d" (r1), "=d" (cc) \
14 : "d" (r1), "d" (r2) \
16 printf(#insn " r1(==%16.16lX),r2(==%16.16lX),0x" #i3 ",0x" #i4 ",0x" #i5 " = %16.16lX (cc=%d)\n", _r1, _r2, r1, cc); \
19 #define r1sweep(i, r2, i3, i4, i5) \
21 DO_RXSBG(i, 000000000000000000ul, r2, i3, i4, i5); \
22 DO_RXSBG(i, 0x0000ffffccccaaaaul, r2, i3, i4, i5); \
23 DO_RXSBG(i, 0xfffffffffffffffful, r2, i3, i4, i5); \
26 #define r2sweep(i, i3, i4, i5) \
28 r1sweep(i, 0x0000000000000000ul, i3, i4, i5); \
29 r1sweep(i, 0x5555ccccffff0000ul, i3, i4, i5); \
30 r1sweep(i, 0xfffffffffffffffful, i3, i4, i5); \
34 /* min/max z=0/1 and some random number in the middle */
35 #define i3sweep(i, i4, i5) \
37 r2sweep(i, 00, i4, i5); \
38 r2sweep(i, 14, i4, i5); \
39 r2sweep(i, 3f, i4, i5); \
40 r2sweep(i, 80, i4, i5); \
41 r2sweep(i, a1, i4, i5); \
42 r2sweep(i, bf, i4, i5); \
45 /* min/max t=0/1 and some random number in the middle */
46 #define i4sweep(i, i5) \
56 /* min/max and other shifts */