From: notaz Date: Sun, 17 Nov 2024 00:17:52 +0000 (+0200) Subject: arm: make sure RunFast is on X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6ede72d95f741cd8761f2eef7bbbf9dbe4486c1;p=pcsx_rearmed.git arm: make sure RunFast is on seems already to be the case on 3ds at least --- diff --git a/frontend/main.c b/frontend/main.c index eb4f1490..9aeece96 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -513,6 +513,16 @@ int emu_core_init(void) SysPrintf("Starting PCSX-ReARMed " REV "%s\n", get_build_info()); SysPrintf("build time: " __DATE__ " " __TIME__ "\n"); +#if defined(__arm__) && defined(__VFP_FP__) + // RunFast mode + u32 fpscr = ~0; + __asm__ volatile("fmrx %0, fpscr" : "=r"(fpscr)); + SysPrintf("old fpscr = %08x\n", fpscr); + fpscr &= ~0x00009f9f; + fpscr |= 0x03000000; // DN | FZ + __asm__ volatile("fmxr fpscr, %0" :: "r"(fpscr)); +#endif + #ifdef HAVE_RTHREADS pcsxr_sthread_init(); #endif diff --git a/plugins/gpulib/gpulib_thread_if.c b/plugins/gpulib/gpulib_thread_if.c index 0b28fe33..6f927db6 100644 --- a/plugins/gpulib/gpulib_thread_if.c +++ b/plugins/gpulib/gpulib_thread_if.c @@ -76,6 +76,15 @@ static void *video_thread_main(void *arg) { static int processed = 0; #endif /* _3DS */ +#if defined(__arm__) && defined(__VFP_FP__) + // RunFast mode + u32 fpscr = ~0; + __asm__ volatile("fmrx %0, fpscr" : "=r"(fpscr)); + fpscr &= ~0x00009f9f; + fpscr |= 0x03000000; // DN | FZ + __asm__ volatile("fmxr fpscr, %0" :: "r"(fpscr)); +#endif + while(1) { int result, cycles_dummy = 0, last_cmd, start, end; video_thread_queue *queue;