tcg: Handle MO_AMASK in tcg_dump_ops

Backports commit 59c4b7e8dfab0cdc41434fedbf2686222f541e57 from qemu
This commit is contained in:
Richard Henderson 2018-02-10 20:32:48 -05:00 committed by Lioncash
parent c5a2a50c06
commit 17c1f027c1
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -1114,10 +1114,19 @@ void tcg_dump_ops(TCGContext *s)
TCGMemOp op = get_memop(oi);
unsigned ix = get_mmuidx(oi);
if (op < ARRAY_SIZE(ldst_name) && ldst_name[op]) {
if (op & ~(MO_AMASK | MO_BSWAP | MO_SSIZE)) {
printf(",%s,%u", ldst_name[op], ix);
} else {
printf(",$0x%x,%u", op, ix);
const char *s_al = "", *s_op;
if (op & MO_AMASK) {
if ((op & MO_AMASK) == MO_ALIGN) {
s_al = "al+";
} else {
s_al = "un+";
}
}
s_op = ldst_name[op & (MO_BSWAP | MO_SSIZE)];
printf(",%s%s,%u", s_al, s_op, ix);
}
i = 1;
}