aboutsummaryrefslogtreecommitdiff
path: root/src/ARMJIT.cpp
Commit message (Collapse)AuthorAge
* Move all core types into namespaces (#1886)Jesse Talavera-Greenberg2023-11-25
| | | | | | | | * Reorganize namespaces - Most types are now moved into the `melonDS` namespace - Only good chance to do this for a while, since a big refactor is next * Fix the build
* Refactor the JIT to be object-oriented (#1879)Jesse Talavera-Greenberg2023-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move TinyVector to a new file - So it's less sensitive to #include ordering * Forgot to include assert.h * Refactor ARMJIT_Memory into an object * Oops, forgot a declaration * Refactor ARMJIT to be contained in an object * Remove an unused function declaration * Add a missing #include * Remove a now-unused global * Use ARMJIT_Memory's own memory access functions * Fix some omissions in the ARM JIT * Move libandroid to be a member of ARMJIT_Memory instead of a global * Default-initialize most fields in ARMJIT_Compiler.h * Define NOOP_IF_NO_JIT * Finish refactoring the JIT to be object-oriented
* update copyright yearsArisotura2023-11-04
|
* Make the NDS teardown more robust (#1798)Jesse Talavera-Greenberg2023-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make cleanup a little more robust to mitigate undefined behavior - Add some null checks before cleaning up the GPU3D renderer - Make sure that all deleted objects are null - Move cleanup logic out of an assert call - Note that deleting a null pointer is a no-op, so there's no need to check for null beforehand - Use RAII for GLCompositor instead of Init/DeInit methods * Replace a DeInit call that I missed * Make ARMJIT_Memory less likely to generate errors - Set FastMem7/9Start to nullptr at the end - Only close and unmap the file if it's initialized * Make Renderer3D manage its resources with RAII * Don't try to deallocate frontend resources that aren't loaded * Make ARMJIT_Memory::DeInit more robust on the Switch * Reset MemoryFile on Windows to INVALID_HANDLE_VALUE, not nullptr - There is a difference * Don't explicitly store a Valid state in GLCompositor or the 3D renderers - Instead, create them with static methods while making the actual constructors private * Make initialization of OpenGL resources fail if OpenGL isn't loaded * assert that OpenGL is loaded instead of returning failure
* fix JIT backjump detectionRSDuck2023-04-13
| | | | pretty embarrassing to loop variable mixup
* I'm stupidRSDuck2023-03-28
|
* comment out JIT debug codeRSDuck2023-03-28
|
* Introduce `Platform::Log` (#1640)Jesse Talavera-Greenberg2023-03-23
| | | | | | | | | | | | | * Add Platform::Log and Platform::LogLevel * Replace most printf calls with Platform::Log calls * Move a brace down * Move some log entries to one Log call - Some implementations of Log may assume a full line * Log the MAC address as LogLevel::Info
* invalidate JIT blocks in ARM7 WVRAM when it's remappedRSDuck2022-08-22
|
* fix copyright headersArisotura2022-03-07
|
* update copyright headersArisotura2022-01-09
|
* decouple JIT from Config. bahahahahahArisotura2021-11-17
|
* more accurate DTCM checkArisotura2021-10-28
|
* more fixes for literal invalidationRSDuck2021-08-31
|
* fix #1187RSDuck2021-08-31
| | | | how could this go on unnoticed for so long?
* JIT: don't lengthen blocks on a skipped SVCRSDuck2021-08-04
| | | | SVC would need special handling because of the bank switching
* ARM64 macOS JIT - fix warnings + some cleanupWaluigiWare642021-07-23
|
* support allocating more registers for aarch64 JITRSDuck2021-06-29
| | | | also some minor fixes for the x64 JIT as well
* Fix some compiler warningsWaluigiWare642021-05-03
|
* Disable JIT write-protect when de-initialising on ARM64 macOSWaluigiWare642021-03-22
|
* update copyright year and add missing GPL headersRSDuck2021-03-12
|
* Fix the JIT Code Memory on ARM64 Macs (#916)WaluigiWare642021-02-22
|
* Fix some compiler warningsWaluigiWare642021-01-25
|
* fix JIT block hash after a merged thumb BLRSDuck2021-01-05
| | | | fixes #928
* JIT fixesRSDuck2020-11-09
| | | | | | | | - fix fastmem problems on linux - small fix memory leak - SlowWrite functions always take in a 32-bit variable so that the C compiler knows that the values aren't necessary zero extended - a few other stylistic things - handle SIGBUS as well (for macos)
* Fix compilation issues on pedantic cpp compilers. (#783)Filippo Scognamiglio2020-10-31
| | | | | * Fix compilation issues on pedantic cpp compilers. * Avoid using fullblown static function.
* remove some UBRSDuck2020-09-04
| | | | | | | - savestates used to read a four bytes from a single byte value - a few unassigned variables - some other things - also make the ROR macro an inline function
* JIT: fix QDSUB/QSUB for interpreter runRSDuck2020-08-24
|
* use unordered map for JIT RestoreCandidatesRSDuck2020-08-14
| | | | also fix WifiRead32?
* reset JIT fastmem on JIT block cache reset as wellRSDuck2020-07-31
|
* check IRQ first then Idle loopRSDuck2020-07-28
| | | | apparently I put it this way for a reason
* for some reason tabs and spaces were mixedRSDuck2020-07-23
|
* make linux work and fix a few bugsRSDuck2020-07-04
|
* reconcile DSi and JIT, fastmem for x64 and WindowsRSDuck2020-06-30
|
* first steps in bringing over the JIT refactor/fastmemRSDuck2020-06-16
|
* use instr hash as key for restore candidatesRSDuck2020-05-09
| | | | makes Golden Sun burn a little slower through the JIT memory
* rewrite JIT memory emulationRSDuck2020-05-09
|
* implement msr and mrs for the x64 JITRSDuck2020-04-26
|
* implement block linking + some refactoringRSDuck2020-04-26
| | | | currently only supported for x64
* re add error for unsupported JIT platformsRSDuck2020-04-26
|
* move ARM64 JIT backend hereRSDuck2020-04-26
|
* improve nop handling and proper behaviour for LDM^RSDuck2020-04-26
| | | | fixes dslinux
* make literal optimisation more reliableRSDuck2020-04-26
| | | | fixes spanish Pokemon HeartGold
* integrate changes from ARM64 backend and moreRSDuck2020-04-26
| | | | | | | | | - better handle LDM/STM in reg alloc - unify Halted and IRQ in anticipation for branch inlining - literal optimisations can be disabled in gui - jit blocks follow simple returns - fix idle loop detection - break jit blocks on IRQ (fixes saving in Pokemon White)
* decrease jit block cache address granularityRSDuck2020-04-26
| | | | | | | fixes Dragon Quest IX move code with side effects out of assert, fixes release build (thanks to m4wx for this one) also remove some leftovers of jit pipelining
* new block cache and much more...RSDuck2020-04-26
| | | | | | | | | - more reliable code invalidation detection - blocks aren't stopped at any branch, but are being followed if possible to get larger blocks - idle loop recognition - optimised literal loads, load/store cycle counting and loads/stores from constant addresses
* load register only if neededRSDuck2020-04-26
| | | | | - do thumb bl long merge in the first step - preparations for better branch jitting
* fixes for flag optimisationRSDuck2020-04-26
|
* optimise away unneeded flag setsRSDuck2020-04-26
| | | | | - especially useful for thumb code and larger max block sizes - can still be improved upon
* abandon pipelining on jitRSDuck2020-04-26
| | | | | fixes Golden Sun Dawn this makes the cpu state incompatible between interpreter and JIT. That's why switching cpu mode requires a restart(not requiring is stupid anyway) and the pipeline is manually filled when making a save state.