Skip to content

Commit

Permalink
arm: make sure RunFast is on
Browse files Browse the repository at this point in the history
seems already to be the case on 3ds at least
  • Loading branch information
notaz committed Nov 17, 2024
1 parent 0d51542 commit f6ede72
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frontend/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions plugins/gpulib/gpulib_thread_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f6ede72

Please sign in to comment.