diff options
author | negativeExponent | 2020-05-21 00:16:51 +0800 |
---|---|---|
committer | negativeExponent | 2020-05-21 00:17:25 +0800 |
commit | a59e553648d65481f8a85822bdd4749fe70371ad (patch) | |
tree | e6ef9eb4c614871732bec1e9127395b973e73817 /deps/lightrec/README.md | |
parent | 5c00ea32a0eab812299b08acd14c25bf6ba4ca7a (diff) | |
download | pcsx_rearmed-a59e553648d65481f8a85822bdd4749fe70371ad.tar.gz pcsx_rearmed-a59e553648d65481f8a85822bdd4749fe70371ad.tar.bz2 pcsx_rearmed-a59e553648d65481f8a85822bdd4749fe70371ad.zip |
Update deps/lightrec
git subrepo clone --branch=master --force https://github.com/pcercuei/lightrec.git deps/lightrec
subrepo:
subdir: "deps/lightrec"
merged: "2081869"
upstream:
origin: "https://github.com/pcercuei/lightrec.git"
branch: "master"
commit: "2081869"
git-subrepo:
version: "0.4.1"
origin: "https://github.com/ingydotnet/git-subrepo.git"
commit: "a04d8c2"
Diffstat (limited to 'deps/lightrec/README.md')
-rw-r--r-- | deps/lightrec/README.md | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/deps/lightrec/README.md b/deps/lightrec/README.md new file mode 100644 index 0000000..40ecc8f --- /dev/null +++ b/deps/lightrec/README.md @@ -0,0 +1,53 @@ + +# Lightrec + +Lightrec is a MIPS-to-everything dynamic recompiler for +PlayStation emulators, using +[GNU Lightning](https://www.gnu.org/software/lightning/) +as the code emitter. + +As such, in theory it should be able to run on every CPU that Lightning +can generate code for; including, but not limited to, __x86__, __x86_64__, +__ARM__, __Aarch64__, __MIPS__, __PowerPC__ and __Risc-V__. + +## Features + +* __High-level optimizations__. The MIPS code is first pre-compiled into +a form of Intermediate Representation (IR). +Basically, just a single-linked list of structures representing the +instructions. On that list, several optimization steps are performed: +instructions are modified, reordered, tagged; new meta-instructions +can be added, for instance to tell the code generator that a certain +register won't be used anymore. + +* __Lazy compilation__. +If Lightrec detects a block of code that would be very hard to +compile properly (e.g. a branch with a branch in its delay slot), +the block is marked as not compilable, and will always be emulated +with the built-in interpreter. This allows to keep the code emitter +simple and easy to understand. + +* __Run-time profiling__. +The generated code will gather run-time information about the I/O access +(whether they hit RAM, or hardware registers). +The code generator will then use this information to generate direct +read/writes to the emulated memories, instead of jumping to C for +every call. + +* __Threaded compilation__. +When entering a loading zone, where a lot of code has to be compiled, +we don't want the compilation process to slow down the pace of emulation. +To avoid that, the code compiler optionally runs on a thread, and the +main loop will emulate the blocks that have not been compiled yet with +the interpreter. This helps to drastically reduce the stutter that +typically happens when a lot of new code is run. + +## Emulators + +Lightrec has been ported to the following emulators: + +* [__PCSX-ReArmed__ (my own fork)](https://github.com/pcercuei/pcsx_rearmed) + +* [__pcsx4all__ (my own fork)](https://github.com/pcercuei/pcsx4all) + +* [__Beetle__ (libretro)](https://github.com/libretro/beetle-psx-libretro/)
\ No newline at end of file |