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 02/11/2022 à 22:14, Nicolas Pomarède a écrit :

Hi

toni, I think a test is missing for DISASM_FLAG_EA in i_Bcc and i_DBcc, as the " == $%08X" is always displayed :

@@ -2408,7 +2409,9 @@ uae_u32 m68k_disasm_2(TCHAR *buf, int bufsize, uaecptr pc, uae_u16 *bufpc, int b
                                 }
                         } else {
                                if (dp->mnemo == i_Bcc || dp->mnemo == i_DBcc) { -                                       buf = buf_out(buf, &bufsize, disasm_lc_hex(_T(" == $%08X")), addr2); +                                       if (disasm_flags & DISASM_FLAG_EA) { +                                               buf = buf_out(buf, &bufsize, disasm_lc_hex(_T(" == $%08X")), addr2);
+                                       }
                                         if (cctrue(dp->cc)) {
                                                buf = buf_out(buf, &bufsize, _T(" (T)"));
                                         } else {

flag DISASM_FLAG_CC is not checked also in this case, so proper fix would be :

@@ -2408,11 +2409,15 @@ uae_u32 m68k_disasm_2(TCHAR *buf, int bufsize, uaecptr pc, uae_u16 *bufpc, int b
                                }
                        } else {
if (dp->mnemo == i_Bcc || dp->mnemo == i_DBcc) { - buf = buf_out(buf, &bufsize, disasm_lc_hex(_T(" == $%08X")), addr2);
-                                       if (cctrue(dp->cc)) {
- buf = buf_out(buf, &bufsize, _T(" (T)"));
-                                       } else {
- buf = buf_out(buf, &bufsize, _T(" (F)"));
+                                       if (disasm_flags & DISASM_FLAG_EA) {
+ buf = buf_out(buf, &bufsize, disasm_lc_hex(_T(" == $%08X")), addr2);
+                                       }
+                                       if (disasm_flags & DISASM_FLAG_CC) {
+                                               if (cctrue(dp->cc)) {
+ buf = buf_out(buf, &bufsize, _T(" (T)"));
+                                               } else {
+ buf = buf_out(buf, &bufsize, _T(" (F)"));
+                                               }
                                        }
                                } else {
if (disasm_flags & DISASM_FLAG_CC) {

Nicolas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/