non-linux regtest: update cmdline expecteds
[valgrind.git] / VEX / test / test-amd64-muldiv.h
blobf8fb2de6cf4a0ae123bf42290dea5c56183b0076
2 void glue(glue(test_, OP), b)(int64 op0, int64 op1)
4 int64 res, s1, s0, flags;
5 s0 = op0;
6 s1 = op1;
7 res = s0;
8 flags = 0;
9 asm ("pushq %4\n\t"
10 "popfq\n\t"
11 stringify(OP)"b %b2\n\t"
12 "pushfq\n\t"
13 "popq %1\n\t"
14 : "=a" (res), "=g" (flags)
15 : "q" (s1), "0" (res), "1" (flags));
16 printf("%-10s A=%016llx B=%016llx R=%016llx CC=%04llx\n",
17 stringify(OP) "b", s0, s1, res, flags & CC_MASK);
20 void glue(glue(test_, OP), w)(int64 op0h, int64 op0, int64 op1)
22 int64 res, s1, flags, resh;
23 s1 = op1;
24 resh = op0h;
25 res = op0;
26 flags = 0;
27 asm ("pushq %5\n\t"
28 "popfq\n\t"
29 stringify(OP) "w %w3\n\t"
30 "pushfq\n\t"
31 "popq %1\n\t"
32 : "=a" (res), "=g" (flags), "=d" (resh)
33 : "q" (s1), "0" (res), "1" (flags), "2" (resh));
34 printf("%-10s AH=%016llx AL=%016llx B=%016llx RH=%016llx RL=%016llx CC=%04llx\n",
35 stringify(OP) "w", op0h, op0, s1, resh, res, flags & CC_MASK);
38 void glue(glue(test_, OP), l)(int64 op0h, int64 op0, int64 op1)
40 int64 res, s1, flags, resh;
41 s1 = op1;
42 resh = op0h;
43 res = op0;
44 flags = 0;
45 asm ("pushq %5\n\t"
46 "popfq\n\t"
47 stringify(OP) "l %3\n\t"
48 "pushfq\n\t"
49 "popq %1\n\t"
50 : "=a" (res), "=g" (flags), "=d" (resh)
51 : "q" ((int)s1), "0" (res), "1" (flags), "2" (resh));
52 printf("%-10s AH=%016llx AL=%016llx B=%016llx RH=%016llx RL=%016llx CC=%04llx\n",
53 stringify(OP) "l", op0h, op0, s1, resh, res, flags & CC_MASK);
56 void glue(glue(test_, OP), q)(int64 op0h, int64 op0, int64 op1)
58 int64 res, s1, flags, resh;
59 s1 = op1;
60 resh = op0h;
61 res = op0;
62 flags = 0;
63 asm ("pushq %5\n\t"
64 "popfq\n\t"
65 stringify(OP) "q %3\n\t"
66 "pushfq\n\t"
67 "popq %1\n\t"
68 : "=a" (res), "=g" (flags), "=d" (resh)
69 : "q" (s1), "0" (res), "1" (flags), "2" (resh));
70 printf("%-10s AH=%016llx AL=%016llx B=%016llx RH=%016llx RL=%016llx CC=%04llx\n",
71 stringify(OP) "q", op0h, op0, s1, resh, res, flags & CC_MASK);
74 #undef OP