Commit Graph

356 Commits

Author SHA1 Message Date
Nekotekina 0a617a05d0 PPU: correct behaviour under external debugger
May require setting "Assume External Debugger" to true.
2022-03-26 23:09:20 +03:00
Nekotekina 12c83b340d Remove built_function
With today's branch prediction techniques, it's hardly useful.
2022-01-24 22:21:41 +03:00
Nekotekina 4704367382 Remove unnecessary asmjit::imm_ptr 2022-01-18 00:10:32 +03:00
Nekotekina 580bd2b25e Initial Linux Aarch64 support
* Update asmjit dependency (aarch64 branch)
* Disable USE_DISCORD_RPC by default
* Dump some JIT objects in rpcs3 cache dir
* Add SIGILL handler for all platforms
* Fix resetting zeroing denormals in thread pool
* Refactor most v128:: utils into global gv_** functions
* Refactor PPU interpreter (incomplete), remove "precise"
* - Instruction specializations with multiple accuracy flags
* - Adjust calling convention for speed
* - Removed precise/fast setting, replaced with static
* - Started refactoring interpreters for building at runtime JIT
*   (I got tired of poor compiler optimizations)
* - Expose some accuracy settings (SAT, NJ, VNAN, FPCC)
* - Add exec_bytes PPU thread variable (akin to cycle count)
* PPU LLVM: fix VCTUXS+VCTSXS instruction NaN results
* SPU interpreter: remove "precise" for now (extremely non-portable)
* - As with PPU, settings changed to static/dynamic for interpreters.
* - Precise options will be implemented later
* Fix termination after fatal error dialog
2022-01-15 06:48:04 +03:00
nastys 0d1c0e72a6 macOS: Increase thread stack size to 8 MiB 2022-01-11 08:05:17 +03:00
nastys 3571e6ef85 macOS: Set correct maxfiles (fixes shader cache and SPU LLVM) 2022-01-11 08:05:17 +03:00
Vestrel 1adc408ad7
More sys_uart packets (#11332)
* Additional sys_uart packets added
2022-01-10 03:43:54 +03:00
Nekotekina cb2748ae08 Update ASMJIT (new upstream API) 2021-12-29 02:45:00 +03:00
Nekotekina d836033212 LLVM: enable some JIT events (Intel, Perf)
Made some related adjustments.
Currently incomplete.
2021-12-26 16:41:37 +03:00
nastys 08333e0876
macOS moltenVK support and SIGBUS handling (#11252) 2021-12-12 21:35:56 +01:00
Eladash cb4711203b logging: Tell apart PPU access violation caused by executing unmapped memory 2021-12-05 01:22:32 +03:00
Eladash e10c6cbaf7 SPU: cpu_work() fixup, fix recursion in AV handler 2021-09-18 19:43:55 +03:00
Eladash bd66dfedc9 Do not allow to unpause after fatal error occured in emulation
* Plus fix #10590
2021-09-09 19:30:54 +02:00
Nekotekina 5ba8daf518 Fix thread time/cycles report with respect to thread pool
Fix all RUSAGE stats as well (POSIX)
2021-08-01 09:59:00 +03:00
Nekotekina 160b131de3 types.hpp: implement smin, smax, amin, amax
Rewritten the following global utility constants:
`umax` returns max number, restricted to unsigned.
`smax` returns max signed number, restricted to integrals.
`smin` returns min signed number, restricted to signed.
`amin` returns smin or zero, less restricted.
`amax` returns smax or umax, less restricted.

Fix operators == and <=> for synthesized rel-ops.
2021-05-22 12:10:57 +03:00
Eladash 638f20c80f Improve get_current_cpu_thread() 2021-05-20 09:25:51 +03:00
David Carlier b09970f159 couple of warning build fixes 2021-05-09 09:25:40 +02:00
Eladash daa53b77cf Simplify named_thread construction 2021-05-01 18:08:03 +03:00
David Carlier b6732fbae9 MacOs build fix proposal.
Made on Big Sur, removing few unnecessary old specifics.
Build with LLVM homebrew.
2021-04-18 17:18:09 +03:00
p01arst0rm c9d2aed286 small collection of fixes 2021-04-15 11:05:15 +03:00
Megamouse a16d8ba3ea More random changes 2021-04-11 14:01:51 +03:00
Eladash 73320d4180 Output all fatal log messages to Console/debugger as well 2021-04-03 08:47:58 +02:00
Eladash 5a3c218239 thread-pool: Fix default rounding mode 2021-03-30 11:13:47 +03:00
xddxd 9d895e6b15 Scheduler overhaul 2021-03-26 00:29:44 +03:00
Eladash a67b347966
debugger: Fix SPU memory viewing (#10007)
* debugger: Fix SPU memory viewing

* Fix terminal recovery from page faults (hack allocation)
2021-03-23 13:33:07 +03:00
Eladash a5bb925a3d Thread.cpp: Add missing newline 2021-03-15 20:41:33 +03:00
Eladash cd6ef2958b Add information about unnamed/main threads in logs and fatal dialog
* If thread is unnamed, keep log name empty for main thread, otherwise print thread id. In fatal dialog, main thread can be handled differently (with special remark that it's main thread).
* Always print thread id in fatal dialog, regardless of thread type.

Co-authored-by: Nekotekina <nekotekina@gmail.com>
2021-03-11 22:55:06 +03:00
Nekotekina a4fdbf0a88 Enable -Wstrict-aliasing=1 (GCC)
Fixed partially.
2021-03-09 03:10:15 +03:00
Nekotekina 3609eb25c9 Implement thread_ctrl::is_main() 2021-03-06 23:10:31 +03:00
Nekotekina 55c75d2c87 Implement thread_ctrl::get_tid() 2021-03-06 23:10:31 +03:00
Nekotekina 87af905018 Enable -Wunused-parameter 2021-03-06 18:07:08 +03:00
Nekotekina ea5e837bd6 fixed_typemap.hpp: return reference 2021-03-02 16:08:14 +03:00
Nekotekina bbf52f3cea named_thread: fix bugs in std::forward usage
Fix few misused threads and other bugs.
2021-03-02 16:08:14 +03:00
Eladash 48cd56acc2
Report deadlocked thread names in failures to stop emulation (#9865)
* Report deadlocked thread names in failures to stop emulation

Co-authored-by: Nekotekina <nekotekina@gmail.com>
2021-03-01 01:06:48 +03:00
Nekotekina de9d859f4a named_thread: implement task queue
atomic_ptr: implement push_head()

thread_ctrl::state() triggers task queue execution.
2021-02-28 20:20:17 +03:00
Nekotekina 3aaa0172d5 named_thread: implement "default" event loop
Fixup "sleepy" thread at startup on Windows.
Permit threads which lack operator()() overload.
2021-02-28 20:16:13 +03:00
Nekotekina 038148bf06 Fix almost all GCC warnings 2021-02-17 22:59:04 +03:00
Eladash f43260bd58
Atomic waiting refactoring (#9208)
* Use atomic waitables instead instead of global thread wait as often as possible.
* Add ::is_stopped() and and ::is_paued() which can be used in atomic loops and with atomic wait. (constexpr cpu flags test functions)
* Fix notification bug of sys_spu_thread_group_exit/terminate. (old bug, enhanced by #9117)
* Function time statistics at Emu.Stop() restored. (instead of current "X syscall failed with 0x00000000 : 0")
2021-02-13 17:50:07 +03:00
Eladash d3bc96a201 Fix minor issue with usage of STL thread::hardware_concurrency() 2021-01-29 18:23:29 +03:00
Eladash a742501a4f Do not account RSX for TSX pauses 2021-01-29 10:31:15 +03:00
Eladash 0652870204 New RSX Debugger 2021-01-28 17:40:26 +03:00
Nekotekina 34274ec391 Purge unused typeid() invocations 2021-01-28 10:23:29 +03:00
Eladash 28feea0447 Unfatal Segfaults 2021-01-27 21:54:29 +03:00
Nekotekina c652d0b183 Detect execution access violation
Don't try to handle it, treat as fatal.
2021-01-27 11:53:10 +03:00
Nekotekina 22c55cbcfa Add trace logging to thread_ctrl::set_thread_affinity_mask 2021-01-26 19:59:48 +03:00
Nekotekina c24d89dd34 Threads: fix typo in emergency_exit (dump useful info) 2021-01-26 19:58:47 +03:00
Nekotekina f10ea1fb9b Thread pool: try to fix resetting affinity mask
Attempt to address #9657
2021-01-26 16:45:36 +03:00
Nekotekina eb72cc9f04 Thread pool: reset thread affinity mask 2021-01-25 22:05:38 +03:00
Nekotekina 8480674708 Thread pool: reset priority 2021-01-24 16:45:28 +03:00
Eladash dbecf0fa50 Introducing RSX debugger entry (main debugger) 2021-01-19 22:55:12 +03:00