]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
4500b3
authorToni Wilen <twilen@winuae.net>
Fri, 2 Oct 2020 17:20:45 +0000 (20:20 +0300)
committerToni Wilen <twilen@winuae.net>
Fri, 2 Oct 2020 17:20:45 +0000 (20:20 +0300)
include/readcpu.h
jit/compemu_support.cpp
newcpu.cpp
od-win32/srcrelease.cmd
od-win32/win32.cpp
traps.cpp

index 224cd0ecf117faa7e3b4419bb936af0d98ad049e..122556b04b02029ab78d691508f8cec8d8ab94f5 100644 (file)
@@ -70,8 +70,12 @@ ENUMDECL {
     fl_return = 3,
     fl_trap = 4,
     fl_const_jump = 8,
+#ifdef UAE
+    fl_end_block = 7
+#else
     /* Instructions that can trap don't mark the end of a block */
     fl_end_block = 3
+#endif
 } ENUMNAME (cflow_t);
 
 ENUMDECL {
index b70eaea4b0a9b4709f866b8a3a425c3b3788e2cc..42939db8e8944c804304d4fe52811875ecb8c130 100644 (file)
@@ -4379,7 +4379,7 @@ void build_comp(void)
                int isaddx;
                int cflow;
 
-               if ((instrmnem)table68k[opcode].mnemo == i_ILLG || table68k[opcode].clev > cpu_level)
+               if (table68k[opcode].mnemo == i_ILLG || table68k[opcode].clev > cpu_level)
                        continue;
 
                if (table68k[opcode].handler != -1) {
index 5b2f8403f39dfa33ccecc2ff2e6e2ded13f73dbb..1f66768e5b07be55382479947f53a2c28c77b59b 100644 (file)
@@ -9750,11 +9750,11 @@ void fill_prefetch_030(void)
 
 void fill_prefetch (void)
 {
-       reset_pipeline_state();
        if (currprefs.cachesize)
                return;
        if (!currprefs.cpu_compatible)
                return;
+       reset_pipeline_state();
        if (currprefs.cpu_model >= 68040) {
                if (currprefs.cpu_compatible || currprefs.cpu_memory_cycle_exact) {
                        fill_icache040(m68k_getpc() + 16);
index e526c2e82bd7e513f0f4a2565792db7faf388557..becda1bcdd4f301b602b49c4d9e60df7921865ad 100644 (file)
@@ -6,7 +6,7 @@ cd ..
 
 del ..\winuaesrc.7z
 
-7z a -r ..\winuaesrc *.c *.cpp *.h *.sln *.vcxproj* *.ico *.rc *.bmp *.cur *.manifest *.png *.txt
+7z a -r ..\winuaesrc *.c *.cpp *.h *.sln *.vcxproj* *.ico *.rc *.bmp *.cur *.manifest *.png *.txt *.def *.asm *.hlsl *.inl *.wav
 
 copy ..\winuaesrc.7z d:\amiga\winuaepackets\winuaesrc%1.7z
 copy ..\winuaesrc.7z d:\amiga /y
index 85952882a697c89e7c232397d52e6b53ac624a37..a18451690b2590d1dbe97a7c12530ce788d1e0ad 100644 (file)
@@ -136,6 +136,7 @@ OSVERSIONINFO osVersion;
 static SYSTEM_INFO SystemInfo;
 static int logging_started;
 static MINIDUMP_TYPE minidumpmode = MiniDumpNormal;
+static int nocrashdump;
 static int doquit;
 static int console_started;
 void *globalipc;
@@ -6588,6 +6589,10 @@ static int parseargs(const TCHAR *argx, const TCHAR *np, const TCHAR *np2)
                resetgui_pending = true;
                return 1;
        }
+       if (!_tcscmp(arg, _T("nocrashdump"))) {
+               nocrashdump = 1;
+               return 1;
+       }
        if (!np)
                return 0;
 
@@ -7306,6 +7311,8 @@ static void create_dump (struct _EXCEPTION_POINTERS *pExceptionPointers)
 
 LONG WINAPI WIN32_ExceptionFilter (struct _EXCEPTION_POINTERS * pExceptionPointers, DWORD ec)
 {
+       if (nocrashdump || isfullscreen() > 0)
+               EXCEPTION_CONTINUE_SEARCH;
        write_log (_T("EVALEXCEPTION %08x!\n"), ec);
        create_dump  (pExceptionPointers);
        return EXCEPTION_CONTINUE_SEARCH;
@@ -7329,6 +7336,9 @@ static void efix (DWORD *regp, void *p, void *ps, int *got)
 
 LONG WINAPI WIN32_ExceptionFilter (struct _EXCEPTION_POINTERS *pExceptionPointers, DWORD ec)
 {
+       if (nocrashdump)
+               EXCEPTION_CONTINUE_SEARCH;
+
        static uae_u8 *prevpc;
        LONG lRet = EXCEPTION_CONTINUE_SEARCH;
        PEXCEPTION_RECORD er = pExceptionPointers->ExceptionRecord;
index 418e7eb181509378e5b9756a8256a616d1f2c6a3..213f9bfd8dbf23c33cb735266367fceef733a50a 100644 (file)
--- a/traps.cpp
+++ b/traps.cpp
@@ -151,9 +151,6 @@ void REGPARAM2 m68k_handle_trap (unsigned int trap_num)
        int has_retval = (trap->flags & TRAPFLAG_NO_RETVAL) == 0;
        int implicit_rts = (trap->flags & TRAPFLAG_DORET) != 0;
 
-       if (trap->name && trap->name[0] != 0 && trace_traps)
-               write_log (_T("TRAP: %s\n"), trap->name);
-
        if (trap_num < trap_count) {
                if (trap->flags & TRAPFLAG_EXTRA_STACK) {
                        /* Handle an extended trap.
@@ -161,9 +158,17 @@ void REGPARAM2 m68k_handle_trap (unsigned int trap_num)
                        * space via a separate, dedicated simple trap which the trap
                        * handler causes to be invoked when it is done.
                        */
+
+                       if (trap->name && trap->name[0] != 0 && trace_traps)
+                               write_log(_T("XTRAP: %s\n"), trap->name);
+
                        trap_HandleExtendedTrap (trap->handler, has_retval);
                } else {
                        /* Handle simple trap */
+
+                       if (trap->name && trap->name[0] != 0 && trace_traps)
+                               write_log(_T("TRAP: %s\n"), trap->name);
+
                        retval = (trap->handler) (NULL);
 
                        if (has_retval)
@@ -334,6 +339,10 @@ static void trap_HandleExtendedTrap(TrapHandler handler_func, int has_retval)
                * It'll do this when the trap handler is done - or when
                * the handler wants to call 68k code. */
                uae_sem_wait(&context->switch_to_emu_sem);
+
+               if (trace_traps) {
+                       write_log(_T("Exit extended trap PC=%08x\n"), m68k_getpc());
+               }
        }
 }
 
@@ -370,6 +379,10 @@ static uae_u32 trap_Call68k(TrapContext *ctx, uaecptr func_addr)
                m68k_setpc(m68k_call_trapaddr);
                fill_prefetch();
 
+               if (trace_traps) {
+                       write_log(_T("Calling m68k PC=%08x %08x\n"), func_addr, m68k_call_trapaddr);
+               }
+
                /* Switch to emulator context. */
                uae_sem_post(&ctx->switch_to_emu_sem);
 
@@ -412,12 +425,12 @@ static uae_u32 REGPARAM2 m68k_call_handler(TrapContext *dummy_ctx)
        m68k_setpc(context->call68k_func_addr);
        fill_prefetch();
 
-       /* End critical section: allow other traps run. */
-       uae_sem_post(&trap_mutex);
-
        /* Restore interrupts. */
        regs.intmask = context->saved_regs.intmask;
 
+       /* End critical section: allow other traps run. */
+       uae_sem_post(&trap_mutex);
+
        /* Dummy return value. */
        return 0;
 }
@@ -430,6 +443,11 @@ static uae_u32 REGPARAM2 m68k_return_handler(TrapContext *dummy_ctx)
        TrapContext *context;
        uae_u32 sp;
 
+       if (trace_traps) {
+               write_log(_T("m68k_return_handler\n"));
+       }
+
+
        /* One trap returning at a time, please! */
        uae_sem_wait(&trap_mutex);
 
@@ -463,6 +481,10 @@ static uae_u32 REGPARAM2 exit_trap_handler(TrapContext *dummy_ctx)
 {
        TrapContext *context = current_context;
 
+       if (trace_traps) {
+               write_log(_T("exit_trap_handler waiting PC=%08x\n"), context->saved_regs.pc);
+       }
+
        /* Wait for trap context thread to exit. */
        uae_wait_thread(context->thread);