Commit Graph

33 Commits

Author SHA1 Message Date
8fc403cdad update copyright headers 2024-06-15 17:01:19 +02:00
bbecab6cb0 Correctly use the refactored JitEnableWrite 2023-12-08 17:19:00 +01:00
e973236203 Refactor NDS and DSi to be objects (#1893)
* First crack at refactoring NDS and DSi into objects

- Remove all global/`static` variables in `NDS` and related classes
- Rely more on virtual dispatch when we need to pick methods at runtime
- Pass `NDS&` or `DSi&` to its constituent components where necessary
- Introduce some headers or move some definitions to break `#include` cycles

* Refactor the frontend to accommodate the core's changes

* Move up `SchedList`'s declaration

- Move it to before the components are initialized so the `map`s inside are initialized
- Fields in C++ are initialized in the order they're declared

* Fix a crash when allocating memory

* Fix JIT-free builds

* Fix GDB-free builds

* Fix Linux builds

- Explicitly qualify some member types in NDS, since they share the same name as their classes

* Remove an unnecessary template argument

- This was causing the build to fail on macOS

* Fix ARM and Android builds

* Rename `Constants.h` to `MemConstants.h`

* Add `NDS::IsRunning()`

* Use an `#include` guard instead of `#pragma once`
2023-11-28 23:16:41 +01:00
346dd4006e Move all core types into namespaces (#1886)
* 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
2023-11-25 18:32:09 +01:00
544fefa27f Refactor the JIT to be object-oriented (#1879)
* 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
2023-11-18 16:40:54 +01:00
79dfb8dc8f Introduce Platform::Log (#1640)
* 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
2023-03-23 18:04:38 +01:00
9a5e884913 JIT: Add bits for Windows ARM64 support 2022-11-05 22:37:27 +01:00
35cc79787d update copyright headers 2022-01-09 02:15:50 +01:00
19ddaee13b finally decouple Config from the core. baahhahahahah 2021-11-18 01:17:51 +01:00
9ee2017443 don't add constant cycles if they're 0 2021-07-24 17:07:08 +02:00
8513900892 ARM64 macOS JIT - fix warnings + some cleanup 2021-07-23 14:07:23 +01:00
aa430608e7 support allocating more registers for aarch64 JIT
also some minor fixes for the x64 JIT as well
2021-06-29 22:25:43 +02:00
0a3a2ad009 fix aarch64 build with gcc 11 2021-04-29 15:15:16 +02:00
436b3c4c1d update copyright year and add missing GPL headers 2021-03-12 20:07:40 +01:00
532dc57025 Fix the JIT Code Memory on ARM64 Macs (#916) 2021-02-22 15:13:39 +00:00
1494d7aa24 fix ARM64 again 2021-01-21 15:32:02 +01:00
3b994fe892 fix last commit for ARM64 2021-01-20 18:01:21 +01:00
771dfaca2e JIT: handle STR post with rd == rn
fixes Zelda Four Swords
2021-01-19 23:50:08 +01:00
ef75e3cdd1 JIT A64: fixes
also update Switch code for latest libnx
2021-01-05 14:36:50 +01:00
49b5860f0f aligned_alloc instead of memalign
also carry over new Switch changes
2020-12-09 18:58:51 +01:00
45ea1fa990 Fix compilation issues on pedantic cpp compilers. (#783)
* Fix compilation issues on pedantic cpp compilers.

* Avoid using fullblown static function.
2020-10-31 17:40:05 +01:00
9772201345 remove some UB
- 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
2020-09-04 20:37:14 +02:00
5903b11bda subtract cycles after checking IRQ and Halt
also switch back to adding to ARM::Cycles instead of subtracting from them
2020-07-27 23:14:39 +02:00
961b4252e2 Make it buildable on aarch64 2020-07-23 19:07:33 +00:00
3827fa562f another try 2020-07-09 00:11:47 +02:00
e335a8ca76 first steps in bringing over the JIT refactor/fastmem 2020-06-16 12:11:19 +02:00
0f53a34551 rewrite JIT memory emulation 2020-05-09 00:45:05 +02:00
5d0f244f3c include more information in DataRegion 2020-04-26 13:05:16 +02:00
05962d9798 the time of good commit names is long gone 2020-04-26 13:05:14 +02:00
266fd20ea5 fixup for aarch64 JIT 2020-04-26 13:05:12 +02:00
42d67c8145 fix LDM usermode for aarch64 as well 2020-04-26 13:05:12 +02:00
899cf97c51 apply fixes for aarch64 linux by @nadiaholmquist 2020-04-26 13:05:10 +02:00
d6cc7de6c4 move ARM64 JIT backend here 2020-04-26 13:05:09 +02:00