2 void glue(glue(test_
, OP
), b
)(long op0
, long op1
)
4 long res
, s1
, s0
, flags
;
11 stringify(OP
)"b %b2\n\t"
14 : "=a" (res
), "=g" (flags
)
15 : "q" (s1
), "0" (res
), "1" (flags
));
16 printf("%-10s A=" FMTLX
" B=" FMTLX
" R=" FMTLX
" CC=%04lx\n",
17 stringify(OP
) "b", s0
, s1
, res
, flags
& CC_MASK
);
20 void glue(glue(test_
, OP
), w
)(long op0h
, long op0
, long op1
)
22 long res
, s1
, flags
, resh
;
29 stringify(OP
) "w %w3\n\t"
32 : "=a" (res
), "=g" (flags
), "=d" (resh
)
33 : "q" (s1
), "0" (res
), "1" (flags
), "2" (resh
));
34 printf("%-10s AH=" FMTLX
" AL=" FMTLX
" B=" FMTLX
" RH=" FMTLX
" RL=" FMTLX
" CC=%04lx\n",
35 stringify(OP
) "w", op0h
, op0
, s1
, resh
, res
, flags
& CC_MASK
);
38 void glue(glue(test_
, OP
), l
)(long op0h
, long op0
, long op1
)
40 long res
, s1
, flags
, resh
;
47 stringify(OP
) "l %k3\n\t"
50 : "=a" (res
), "=g" (flags
), "=d" (resh
)
51 : "q" (s1
), "0" (res
), "1" (flags
), "2" (resh
));
52 printf("%-10s AH=" FMTLX
" AL=" FMTLX
" B=" FMTLX
" RH=" FMTLX
" RL=" FMTLX
" CC=%04lx\n",
53 stringify(OP
) "l", op0h
, op0
, s1
, resh
, res
, flags
& CC_MASK
);
56 #if defined(__x86_64__)
57 void glue(glue(test_
, OP
), q
)(long op0h
, long op0
, long op1
)
59 long res
, s1
, flags
, resh
;
66 stringify(OP
) "q %3\n\t"
69 : "=a" (res
), "=g" (flags
), "=d" (resh
)
70 : "q" (s1
), "0" (res
), "1" (flags
), "2" (resh
));
71 printf("%-10s AH=" FMTLX
" AL=" FMTLX
" B=" FMTLX
" RH=" FMTLX
" RL=" FMTLX
" CC=%04lx\n",
72 stringify(OP
) "q", op0h
, op0
, s1
, resh
, res
, flags
& CC_MASK
);