winedbg: Simplify Coprocessor operators in the Thumb2 disassembler.

This commit is contained in:
André Hentschel 2012-10-07 17:35:43 +02:00 committed by Alexandre Julliard
parent a0ae8b4bd2
commit 86d0c87552
1 changed files with 8 additions and 16 deletions

View File

@ -1058,15 +1058,11 @@ static UINT thumb2_disasm_coprocdat(UINT inst, ADDRESS64 *addr)
{
WORD opc2 = (inst >> 5) & 0x07;
if (opc2)
dbg_printf("\n\tcdp%s\tp%u, #%u, cr%u, cr%u, cr%u, #%u", (inst & 0x10000000)?"2":"",
get_nibble(inst, 2), get_nibble(inst, 5), get_nibble(inst, 3),
get_nibble(inst, 4), get_nibble(inst, 0), opc2);
else
dbg_printf("\n\tcdp%s\tp%u, #%u, cr%u, cr%u, cr%u", (inst & 0x10000000)?"2":"",
get_nibble(inst, 2), get_nibble(inst, 5), get_nibble(inst, 3),
get_nibble(inst, 4), get_nibble(inst, 0));
dbg_printf("\n\tcdp%s\tp%u, #%u, cr%u, cr%u, cr%u", (inst & 0x10000000)?"2":"",
get_nibble(inst, 2), get_nibble(inst, 5), get_nibble(inst, 3),
get_nibble(inst, 4), get_nibble(inst, 0));
if (opc2) dbg_printf(", #%u", opc2);
return 0;
}
@ -1075,15 +1071,11 @@ static UINT thumb2_disasm_coprocmov1(UINT inst, ADDRESS64 *addr)
WORD opc1 = (inst >> 21) & 0x07;
WORD opc2 = (inst >> 5) & 0x07;
if (opc2)
dbg_printf("\n\t%s%s\tp%u, #%u, %s, cr%u, cr%u, #%u", (inst & 0x00100000)?"mrc":"mcr",
(inst & 0x10000000)?"2":"", get_nibble(inst, 2), opc1,
tbl_regs[get_nibble(inst, 3)], get_nibble(inst, 4), get_nibble(inst, 0), opc2);
else
dbg_printf("\n\t%s%s\tp%u, #%u, %s, cr%u, cr%u", (inst & 0x00100000)?"mrc":"mcr",
(inst & 0x10000000)?"2":"", get_nibble(inst, 2), opc1,
tbl_regs[get_nibble(inst, 3)], get_nibble(inst, 4), get_nibble(inst, 0));
dbg_printf("\n\t%s%s\tp%u, #%u, %s, cr%u, cr%u", (inst & 0x00100000)?"mrc":"mcr",
(inst & 0x10000000)?"2":"", get_nibble(inst, 2), opc1,
tbl_regs[get_nibble(inst, 3)], get_nibble(inst, 4), get_nibble(inst, 0));
if (opc2) dbg_printf(", #%u", opc2);
return 0;
}