Re: [hatari-devel] WinUAE CPU core disassembler output options : fix for DISASM_FLAG_EA |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Le 27/11/2022 à 15:45, Eero Tamminen a écrit :
Hi,
After applying your flags.patch, there are still other places showing
(not any more relevant) values in CPU core disassembly:
------------------------------------
00E503B6 2470 C800 movea.l (a0,a4.l,$00) == $00e502ac,a2
...
00E506C2 4232 0000 clr.b (a2,d0.w,$00) == $00e729f8
...
00E50B04 43F2 0800 lea.l (a2,d0.l,$00) == $00e729f8,a1
...
00E50EC2 00EA 00F0 00F6 [ cmp2.b (a2,$00F6),d0 ]
00E50EC4 00F0 00F6 00FC [ cmp2.b (a0,d0.w,$fc) == $00002300,d0 ]
00E50EC6 00F6 00FC 0102 [ cmp2.b (a6,d0.w,$02) == $0000f7ea (68020+),d0 ]
...
00E50EF0 0174 017A bchg.b d0,(a4,d0.w,$7a) == $00e5262a (68020+)
...
00E50F06 01B6 01BC bclr.b d0,(a6,d0.w,$bc) == $0000f7a4 (68020+)
------------------------------------
For Toni : fixed with attached updated patch "flags2.patch" ; this was
created by the "bried format extension" for 68020+ that I forgot to
patch at first.
(And what's with 'cmp2' being in square brackets?)
I think that means your cpu model is not compatible with these opcodes.
If I start in falcon mode with 68030, there're no [] for me.
when starting with no debug flag at all (--disasm 0), I now get this for
some of your examples :
00050000 2470 C800 MOVEA.L (A0,A4.L,$00),A2
00050004 00EA 00F0 00F6 CMP2.B (A2,$00F6),D0
0005000A 00F0 00F6 00FC CMP2.B (A0,D0.W,$fc),D0
00050010 0174 017A 0000 0000 0000 BCHG.B D0,([$00000000,A4],$0000)
Nicolas
diff --git a/src/cpu/disasm.c b/src/cpu/disasm.c
index 61fdc61d..f474beb9 100644
--- a/src/cpu/disasm.c
+++ b/src/cpu/disasm.c
@@ -458,8 +458,10 @@ uaecptr ShowEA_disp(uaecptr *pcp, uaecptr base, TCHAR *buffer, const TCHAR *name
addr = base + outer;
if (buffer) {
- _stprintf(p, disasm_lc_hex(_T(" == $%08X")), addr);
- p += _tcslen(p);
+ if (disasm_flags & DISASM_FLAG_VAL) {
+ _stprintf(p, disasm_lc_hex(_T(" == $%08X")), addr);
+ p += _tcslen(p);
+ }
}
} else {
@@ -479,9 +481,15 @@ uaecptr ShowEA_disp(uaecptr *pcp, uaecptr base, TCHAR *buffer, const TCHAR *name
addr = base + (uae_s32)((uae_s8)disp8) + dispreg;
if (buffer) {
if (pcrel) {
- _stprintf(buffer, _T("(%s%s%s,$%02x=$%08x) == $%08x"), name, regstr, mult, (uae_u8)disp8, (*pcp) += disp8, addr);
+ if (disasm_flags & DISASM_FLAG_VAL)
+ _stprintf(buffer, _T("(%s%s%s,$%02x=$%08x) == $%08x"), name, regstr, mult, (uae_u8)disp8, (*pcp) += disp8, addr);
+ else
+ _stprintf(buffer, _T("(%s%s%s,$%02x=$%08x)"), name, regstr, mult, (uae_u8)disp8, (*pcp) += disp8);
} else {
- _stprintf(buffer, _T("(%s%s%s,$%02x) == $%08x"), name, regstr, mult, (uae_u8)disp8, addr);
+ if (disasm_flags & DISASM_FLAG_VAL)
+ _stprintf(buffer, _T("(%s%s%s,$%02x) == $%08x"), name, regstr, mult, (uae_u8)disp8, addr);
+ else
+ _stprintf(buffer, _T("(%s%s%s,$%02x)"), name, regstr, mult, (uae_u8)disp8);
}
if (((dp & 0x0100) || m != 1) && currprefs.cpu_model < 68020) {
_tcscat(buffer, _T(" (68020+)"));
@@ -1692,7 +1700,9 @@ static void resolve_if_jmp(TCHAR *s, uae_u32 addr)
if (opcode == 0x4ef9) { // JMP x.l
TCHAR *p = s + _tcslen(s);
uae_u32 addr2 = get_long_debug(addr + 2);
- _stprintf(p, disasm_lc_hex(_T(" == $%08X ")), addr2);
+ if (disasm_flags & DISASM_FLAG_VAL) {
+ _stprintf(p, disasm_lc_hex(_T(" == $%08X ")), addr2);
+ }
showea_val(p + _tcslen(p), opcode, addr2, 4);
TCHAR txt[256];
bool ext;