Commit Graph

24 Commits

Author SHA1 Message Date
David Guillen Fandos 71ebc49b59 Improve indirect jumps in ARM
Handle already translated blocks in the ARM asm to speed up indirect
branches (affect some games more than others)
2021-03-30 21:06:52 +02:00
David Guillen Fandos a494a3f00e Move OAM update flag to a register
Fix a small bug in MIPS dynarec that affects non -G0 targets
2021-03-26 23:13:26 +01:00
David Guillen Fandos ff510e7f7a Move caches to stub files to get around gcc 10
Seems that using the __atribute__ magic for sections is not the best way
of doing this, since it injects some default atributtes that collide
with the user defined ones. Using assembly is far easier in this case.

Reworked definitions a bit to make it easier to import from assembly.
Also wrapped stuff around macros for easy and less verbose
implementation of the symbol prefix issue.
2021-03-23 20:02:44 +01:00
David Guillen Fandos 11ec213c99 Make ewram memory lineal
This saves a few cycles in MIPS and simplifies a bit the core.
Removed the write map, only affects interpreter performance very
minimally. Rewired ARM and x86 handlers to support direct access to
I/EWRAM (and VRAM on ARM) to compensate. Overall performance is slightly
better but code is cleaner and allows for further improvements in the
dynarecs.
2021-03-23 19:09:56 +01:00
David Guillen Fandos eab44b9e0b Enable runtime dynarec enable/disable
Added a more thorough cache cleanup for reset/mode-change too.
Fixed the mmap initialization that ends up leaking memory.
Minor x86 asm fixes for Android.
2021-03-17 21:05:49 +01:00
David Guillen Fandos fb7ca09b01 Remove BIOS reserved translation area
This is not really necessary since it can share area with ROM.
Performance impact should be very minimal (haven't noticed it myself)
and could be compensated (even by a positive offset) if we bump the ROM
cache area size.
Tested with several dynarecs.
2021-03-17 18:33:02 +01:00
David Guillen Fandos 5ffd2832e8 Rewrite of the MIPS dynarec stubs
This allows us to emit the handlers directly in a more efficient manner.
At the same time it allows for an easy fix to emit PIC code, which is
necessary for libretro. This also enables more platform specific
optimizations and variations, perhaps even run-time multiplatform
support.
2021-03-16 22:58:58 +01:00
David Guillen Fandos 56dc6ecb70 Remove libco
This removes libco and all the usages of it (+pthreads).
Rewired all dynarecs and interpreter to return after every frame so that
libretro can process events. This required to make dynarec re-entrant.

Dynarecs were updated to check for new frame on every update (IRQ, cycle
exhaustion, I/O write, etc). The performance impact of doing so should
be minimal (and definitely outweight the libco gains). While at it,
fixed small issues to get a bit more perf: arm dynarec was not idling
correctly, mips was using stack when not needed, etc.

Tested on PSP (mips), OGA (armv7), Linux (x86 and interpreter). Not
tested on Android though.
2021-03-08 18:44:03 +01:00
David Guillen Fandos 3d558413fd Fix x86 dynarec, broken by d10c4afe
The dynarec expects function args to be located in registers instead of
the stack, which is not the default calling convetion in GCC/clang.
2021-03-06 21:15:22 +01:00
bmaupin 89e55e9902 Reenable native file IO on PSP 2019-10-03 13:53:34 -04:00
Francisco José García García 6ab0992ecf (VITA) Dynarec WIP 2016-08-08 00:31:21 +02:00
aliaspider f1d14fbe7c (3ds) dynarec: map the translation caches to specific addresses at
runtime, increases compatibility with loaders that can reloacate each
program section seperately.
move the svc enabling functions to the frontend.
2015-11-04 15:46:27 +01:00
aliaspider 0c72336d44 (CTR/3DS) using a heap allocator with a size determined at runtime can
remove the static memory limitation, no need to use the smaller dynarec
buffer size.
2015-09-20 22:14:36 +01:00
twinaphex 5e55f00fd1 Cleanups 2015-07-30 03:07:03 +02:00
aliaspider 94385ee3df (CTR/3DS) reduce the size of the preallocated memory used by the dynamic
recompiler.
2015-04-16 18:20:09 +01:00
Twinaphex d10c4afea2 Get rid of function_cc 2014-12-20 09:14:38 +01:00
aliaspider a926a68eb3 cleanups 2014-12-10 12:53:26 +01:00
aliaspider 6d7fd87e07 add a HAVE_MMAP check, cleanups. 2014-12-10 12:29:19 +01:00
aliaspider ad485d434a implement retro_serialize/unserialize 2014-12-10 11:06:17 +01:00
aliaspider 1a6a136801 dynamic recompiler now works when the core is compiled as a shared
library.
2014-12-09 09:54:33 +01:00
notaz bbba320911 enable -Wall and fix warnings reported by it 2011-09-06 00:18:06 +03:00
notaz 8b6232a675 fix some warnings 2011-09-03 01:31:26 +03:00
notaz ee0a3871f9 get rid of GP2X_BUILD checks where they are not really needed 2011-09-03 01:01:17 +03:00
notaz 2823a4c819 original source from gpsp09-2xb_src.tar.bz2 2009-05-21 18:48:31 +03:00