get rid of TARGET_NO_EXCEPTIONS

This commit is contained in:
Flyinghead 2024-11-06 16:59:16 +01:00
parent fc6142b332
commit cd8a88366d
6 changed files with 3 additions and 27 deletions

View File

@ -100,7 +100,7 @@
#endif
#endif
#if !defined(LIBRETRO) && !defined(TARGET_NO_EXCEPTIONS)
#if !defined(LIBRETRO)
#define USE_GGPO
#endif

View File

@ -385,11 +385,9 @@ bool reserve()
if (ram_base != nullptr)
return true;
// Use vmem only if settings mandate so, and if we have proper exception handlers.
#if !defined(TARGET_NO_EXCEPTIONS)
// Use vmem only if settings mandate so.
if (!settings.dynarec.disable_nvmem)
virtmem::init((void**)&ram_base, (void**)&p_sh4rcb, RAM_SIZE_MAX + VRAM_SIZE_MAX + ARAM_SIZE_MAX + elan::ERAM_SIZE_MAX);
#endif
return true;
}

View File

@ -431,10 +431,6 @@ void RuntimeBlockInfo::Discard()
void RuntimeBlockInfo::SetProtectedFlags()
{
#ifdef TARGET_NO_EXCEPTIONS
this->read_only = false;
return;
#endif
// Don't write protect rom and BIOS/IP.BIN (Grandia II)
if (!IsOnRam(addr) || (addr & 0x1FFF0000) == 0x0c000000)
{

View File

@ -30,8 +30,6 @@ extern "C" char __start__;
#define siginfo_t switch_siginfo_t
#endif // __SWITCH__
#if !defined(TARGET_NO_EXCEPTIONS)
void context_from_segfault(host_context_t* hctx, void* segfault_ctx);
void context_to_segfault(host_context_t* hctx, void* segfault_ctx);
@ -110,16 +108,6 @@ void os_UninstallFaultHandler()
#endif
}
#else // !defined(TARGET_NO_EXCEPTIONS)
void os_InstallFaultHandler()
{
}
void os_UninstallFaultHandler()
{
}
#endif // !defined(TARGET_NO_EXCEPTIONS)
#if !defined(__unix__) && !defined(LIBRETRO) && !defined(__SWITCH__)
[[noreturn]] void os_DebugBreak()
{

View File

@ -8,7 +8,7 @@
#define __USE_GNU 1
#endif
#if !defined(TARGET_NO_EXCEPTIONS) && !defined(__OpenBSD__)
#if !defined(__OpenBSD__)
#include <ucontext.h>
#endif
@ -39,7 +39,6 @@ static void bicopy(Tctx& ctx, Tseg& seg)
template<bool ToSegfault>
static void context_segfault(host_context_t* hostctx, void* segfault_ctx)
{
#if !defined(TARGET_NO_EXCEPTIONS)
#if HOST_CPU == CPU_ARM
#if defined(__FreeBSD__)
bicopy<ToSegfault>(hostctx->pc, MCTX(.__gregs[_REG_PC]));
@ -133,8 +132,6 @@ static void context_segfault(host_context_t* hostctx, void* segfault_ctx)
#else
#error Unsupported HOST_CPU
#endif
#endif
}
void context_from_segfault(host_context_t* hostctx, void* segfault_ctx) {

View File

@ -283,8 +283,6 @@ void release_jit_block(void *code_area1, void *code_area2, size_t size)
} // namespace virtmem
#ifndef TARGET_NO_EXCEPTIONS
#include <ucontext.h>
void fault_handler(int sn, siginfo_t * si, void *segfault_ctx);
@ -325,7 +323,6 @@ void __libnx_exception_handler(ThreadExceptionDump *ctx)
context_switch_aarch64(ptr);
}
}
#endif // TARGET_NO_EXCEPTIONS
#ifndef LIBRETRO
[[noreturn]] void os_DebugBreak()