summaryrefslogtreecommitdiff
path: root/cpu_threaded.c
AgeCommit message (Collapse)Author
2021-05-17Add ROM mirroring and fix mult. cycle countDavid Guillen Fandos
This should correct some minor issues in some games.
2021-05-07Small optimization (~2-4%) and whitespace cleanup!David Guillen Fandos
Cleans up a ton of whitespace in cpu.c (like 100KB!) and improves readability of some massive decode statements. Added an optimization for PC-relative loads (pool load) in ROM (since it's read only and cannot possibily change) that directly emits an immediate load. This is way faster, specially in MIPS/x86, ARM can be even faster if we rewrite the immediate load macros to also use a pool.
2021-05-05Adding Code Breaker cheat supportDavid Guillen Fandos
This works on both interpreter and dynarec. Tested in MIPS, ARM and x86, still needs some more testing, some edge cases can be buggy.
2021-04-03Add instruction tracing, for testing purposesDavid Guillen Fandos
2021-03-30Improve indirect jumps in ARMDavid Guillen Fandos
Handle already translated blocks in the ARM asm to speed up indirect branches (affect some games more than others)
2021-03-23Move caches to stub files to get around gcc 10David Guillen Fandos
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-23Make ewram memory linealDavid Guillen Fandos
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-17Enable runtime dynarec enable/disableDavid Guillen Fandos
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-17Remove BIOS reserved translation areaDavid Guillen Fandos
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-16Rewrite of the MIPS dynarec stubsDavid Guillen Fandos
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-12Improve and simplify dynarec JIT area.David Guillen Fandos
Also fix a regression on VITA. Use gcc/OS cache flushing routines for MIPS32 instead of synci
2021-03-12Improve cache flush magicDavid Guillen Fandos
Make it better and more generic. Add support for MIPS32 and fix the messy PSP code.
2021-03-10Remove PSP-specific stuff from MIPS backendDavid Guillen Fandos
This is unnecessary since newlib supports all file I/O. This is needed for other mips ports
2021-03-09Add workaround for Android ARM buildsDavid Guillen Fandos
While we are at it, use ARM mode for better performance.
2021-03-06Fix x86 dynarec, broken by d10c4afeDavid Guillen Fandos
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-05Reduce executable size by 90%David Guillen Fandos
Turns out most of that file ends up in JIT section, which is RWX and not a very nice way to run code really (security issues aside). This also makes possible to build that file with -ggdb otherwise it complains about stuff.
2021-02-15More cleanups (mostly whitespace and unused stuff)David Guillen Fandos
2021-02-10Fix ARM dynarecDavid Guillen Fandos
Turns out there were a couple of very interesting and hard to track bugs. A missing comma made the reg list too short, leaving the 31th element at the mercy of the linker ordering algorithm, which seems to work in some cases depending on the compiler version. Also the cache flush code seemed not to work on my machine (OGA), not sure why it wored in the past :/
2019-11-09[VITA] Fixes bug causing dynarec stutteringFrancisco José García García
2019-10-20Get dynarec working again for PSPbmaupin
2016-10-04Remove RW_INITFrancisco José García García
2016-10-04(VITA) Dynarec changesFrancisco José García García
2016-10-03(VITA) Dynarec workingFrancisco José García García
2016-08-15Fix build issuestwinaphex
2016-08-14(VITA) Dynarec WIPFrancisco José García García
2016-08-08(VITA) Dynarec WIPFrancisco José García García
2015-11-04(3ds) dynarec: map the translation caches to specific addresses ataliaspider
runtime, increases compatibility with loaders that can reloacate each program section seperately. move the svc enabling functions to the frontend.
2015-09-11(3DS) add dynarec support when started from a .cia installaliaspider
use libkhax for ninjhax 1.0
2015-04-08(3DS) enable dynarec support, works only with ninjahax.aliaspider
2014-12-20Get rid of function_ccTwinaphex
2014-12-13Remove a lot of the GNU case range extensions instancestwinaphex
2014-12-11Reimplement cache invalidation codetwinaphex
2014-12-11(Android) For Android x86 build - try to use mmap, for Android - use ↵twinaphex
ARM_MEMORY_DYNAREC codepath
2014-12-10(Android) Works now with dynarectwinaphex
2014-12-10PC_BUILD can go nowtwinaphex
2014-12-10We don't need to get rid of idle loop patching for non-dynarectwinaphex
core
2014-12-10Add HAVE_DYNAREC ifdeftwinaphex
2014-12-10Code nits - get rid of '== NULL' / '!= NULL'twinaphex
2014-12-10Style nitstwinaphex
2014-12-10cleanupsaliaspider
2014-12-10add a HAVE_MMAP check, cleanups.aliaspider
2014-12-10Demacro-ize block_builder_arm/block_builder_thumbtwinaphex
2014-12-10Add macro parameter 'opcode' to some macrostwinaphex
2014-12-09dynamic recompiler now works when the core is compiled as a sharedaliaspider
library.
2011-09-06enable -Wall and fix warnings reported by itnotaz
2011-09-03fix some warningsnotaz
2011-09-03revive PC build, support Linuxnotaz
2011-09-03get rid of GP2X_BUILD checks where they are not really needednotaz
2011-09-02move platform-independent stuff out of /gp2x.notaz
2009-06-21cache clean fixnotaz