summaryrefslogtreecommitdiff
path: root/cpu.c
AgeCommit message (Collapse)Author
2021-07-03Merge remote-tracking branch 'libretro/master' into pico-feneonloop
2021-07-01Fix some UB behaviourDavid Guillen Fandos
2021-06-27Enable big-endian devices: gc/wiiDavid Guillen Fandos
This patch adds big-endian compatibility in gpsp (in general but only for the interpreter). There's no performance hit for little-endian platforms (should be a no-op) and only add a small overhead in memory accesses for big-endian platforms. Most memory accesses are wrapped with a byteswap instruction and I/O reg accesses are also rewired for proper access (using macros). Video rendering has been fixed to also do byteswaps but there's a couple of games and rendering modes that still seem broken (but they amount to less than 20 games in my tests with 1K ROMs). This also adds build rules and CI for NGC/WII/WIIU (untested)
2021-06-09Cleanup unused stuffDavid Guillen Fandos
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-05Fix aligned32 reads in interpreter modeDavid Guillen Fandos
An address check was missing to read aligned 32 (stm/ldm) data from high mem areas (0xX0000000). This fixes SM4 EU that for some reason has some weird memory access (perhaps a bug?)
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-05-05Revert "Remove BIOS reserved translation area"neonloop
This reverts commit fb7ca09b019248b9a0aba481ea55386f71053d73. It seems that commit broke rolling in Minish Cap when using the ARM dynarec.
2021-03-26Move OAM RAM to stubs alsoDavid Guillen Fandos
Makes accesses more efficient for MIPS. Make accesses also fast for palette reads.
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-22Adding Normmatt's BIOS as a built-in BIOSDavid Guillen Fandos
Add options to select whether to boot from BIOS (default is no, as it is now) and whether to use the original bios or the builtin one (default is auto, which tries to use the official but falls back to the builtin if not found).
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-16Move a few more registers to contextDavid Guillen Fandos
This gets rid of some more absolute addrs in the MIPS dynarec. Tested on several platforms, we should be good.
2021-03-15Move palettes around to simplify MIPS dynarecDavid Guillen Fandos
Will move also OAM structures to gain a few cycles per load/store. Loads can also be optimized for an extra instruction per access.
2021-03-08Remove libcoDavid Guillen Fandos
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.
2015-07-26Prevent bunch of warningstwinaphex
2014-12-14Rename cpu_orig.c to cpu.ctwinaphex
2014-12-13Remove a lot of the GNU case range extensions instancestwinaphex
2014-12-12CPU interpreter - group more case ranges togethertwinaphex
2014-12-12CPU interpreter - group THUMB cases 0x38 to 0x3F (SUB) togethertwinaphex
2014-12-12Use thumb_opcode_val & 0x7 insteadtwinaphex
2014-12-12CPU interpreter - group THUMB case range 0x30 to 0x37 (ADD) togethertwinaphex
2014-12-12CPU interpreter - group THUMB cases 0x28 to 0x2F togethertwinaphex
2014-12-12CPU interpreter - group Thumb opcode case ranges 0x20 - 0x27 togethertwinaphex
2014-12-12execute_arm_instruction and execute_thumb_instruction - throw themtwinaphex
straight into execute_arm/execute_thumb functions
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-10implement retro_serialize/unserializealiaspider
2014-12-10Remove SDL code in cpu.ctwinaphex
2014-12-10Add macro parameter 'opcode' to some macrostwinaphex
2014-12-09Assume PC_BUILDtwinaphex
2014-12-09Remove gui.ctwinaphex
2014-12-09video output now works in statically linked builds.aliaspider
core can't be used as a shared library yet due to the dynarec not working when compiled with -fPIC
2014-12-09can compilealiaspider
2011-09-06enable -Wall and fix warnings reported by itnotaz
2011-09-03fix some warningsnotaz
2009-05-21original source from gpsp09-2xb_src.tar.bz2notaz