Nekotekina
5248240e10
atomic.cpp: improvements.
...
Reduced static memory amount for waitable atomics.
Allow notifier to skip notifications if wait/notify masks don't overlap.
Improve raw_notify to wake up the thread by its id, add thread_id arg.
Add optional mask argument to notify_one() and notify_all().
2020-11-05 05:51:43 +03:00
Nekotekina
95dbcf2fd7
Logs: add callback for cpu_thread to set cpu_flag::wait
...
May improve waiting time in critical suspend_all ops.
2020-10-29 18:57:57 +03:00
Eladash
e791678dfc
atomic.cpp: fix memory ordering loads and release stores
2020-10-28 20:45:13 +03:00
Nekotekina
c491b73f3a
SPU: improve accurate DMA
...
Remove vm::reservation_lock from it.
Use lock bits to prevent memory clobbering in GETLLAR.
Improve u128 for MSVC since it's used for bitlocking.
Improve 128 bit atomics for the same reason.
Improve vm::reservation_op and friends.
2020-10-28 03:47:41 +03:00
Nekotekina
c50233cc92
atomics.cpp: add support for waiting on 128-bit atomics
...
Complementarily.
Also refactored to make waiting mask non-template arg.
2020-10-28 03:47:41 +03:00
Nekotekina
6806e3d5c7
atomic.cpp: implement notify callback
...
Notification can be very heavy, especially if we need to wake many threads.
Callback is set for cpu_thread in order to set wait flag accordingly.
2020-10-27 17:56:19 +03:00
Nekotekina
d344701fd5
atomic.cpp: add sparse atomics
...
Set alignment as second template argument (typically cache line).
2020-10-26 01:15:31 +03:00
Nekotekina
af6fcb19a8
atomic.cpp: add std primitive fallback for other platforms
...
Other platforms = not Windows or Linux.
2020-10-25 16:45:22 +03:00
Nekotekina
7db77a5580
atomic.cpp: use new thread alerting API (Win8+)
...
Win7 will remain using old API (keyed events).
2020-10-24 19:06:02 +03:00
Nekotekina
c479d431a4
atomic.cpp: experimental optimization (Win7+)
...
Try non-blocking wake up function first.
2020-10-24 14:16:32 +03:00
Nekotekina
8628fc441d
atomic.cpp: rewrite internals (again)
...
Use individual semaphore for each thread.
Unfortunately, limit max thread waiting for single address (60).
If limit is reached, use busy waiting.
2020-10-24 14:16:32 +03:00
Nekotekina
d48d67767a
atomic.cpp: integrate callback check in ptr_cmp function
2020-10-24 14:16:32 +03:00
Nekotekina
59d9e7ce98
Revert "Atomics: use WaitOnAddress if available (Win8+)"
...
This reverts commit f0fd7e2e19 .
2020-10-21 09:59:08 +03:00
Nekotekina
306593a0c5
Revert "atomic.cpp: fixup for WaitOnAddress path"
...
This reverts commit 3b8bce1bed .
2020-10-21 09:54:22 +03:00
Nekotekina
3b8bce1bed
atomic.cpp: fixup for WaitOnAddress path
...
Also fix wait quantum.
2020-10-21 08:18:27 +03:00
Nekotekina
f0fd7e2e19
Atomics: use WaitOnAddress if available (Win8+)
2020-10-21 00:22:08 +03:00
Nekotekina
dc8252bb9f
Remove XABORT in PPU/SPU transactions.
...
It's expensive for unknown reason. Simply XEND is usually much cheaper.
Add some minor improvements. Use g_sudo_addr.
2020-10-20 09:10:21 +03:00
Eladash
17c8b34088
atomic.cpp: Optimize sema_get to not always use atomic instruction ( #8907 )
2020-09-16 22:15:14 +03:00
Eladash
fe9c61fe73
atomic.hpp: Fix atomic_storage_futex::raw_notify
2020-09-12 22:11:40 +03:00
Megamouse
46e8b4f561
patch_manager: add download button
2020-09-09 20:34:17 +02:00
Megamouse
d633a266c1
Add config override as cli arg: --config <path>
...
And add some more logging
2020-08-03 21:31:53 +02:00
Megamouse
47040be3ad
cheat_manager: improve parser errors
2020-07-29 13:18:33 +02:00
Eladash
58e2465369
Make std::bit_cast hack-implementation constexpr in simple cases
2020-07-14 12:14:44 +03:00
Eladash
07a44d0ff9
Implement constexpr byteswapping
2020-07-14 12:14:44 +03:00
Megamouse
1c7a318413
patch manager: move try catch block to yaml.cpp
2020-06-21 15:48:30 +02:00
Nekotekina
98ab5d5ba2
atomic.hpp: modernize inline assembly for lock bts/btr/btc
...
Use flag output (requires clang 9+).
2020-04-28 18:05:32 +03:00
Nekotekina
032e7c0491
Replace utils::cntlz{32,64} with std::countl_zero
2020-04-14 16:05:58 +03:00
Nekotekina
d0c199d455
Replace utils::cnttz{32,64} with std::countr_{zero,one}
...
Make #include <bit> mandatory.
2020-04-14 16:05:58 +03:00
Nekotekina
17f3a114be
Fat atomics: implement exchange() and compare_exchange()
...
Also includes compare_and_swap() and compare_and_swap_test().
Also includes fixes for load(), store(), and atomic_op().
2020-04-12 16:56:21 +03:00
Megamouse
078c31c1da
Qt: fix lupdate warnings (used for translation)
2020-04-06 20:59:58 +02:00
Eladash
13820d6802
SPU debugger: Show channels data
2020-04-03 18:37:21 +03:00
Megamouse
fc3a134e7d
Emu: make "Silence All Logs" dynamic
2020-03-31 18:06:37 +02:00
Nekotekina
04dedb17eb
Disable exception handling.
...
Use -fno-exceptions in cmake.
On MSVC, enable _HAS_EXCEPTION=0.
Cleanup throw/catch from the source.
Create yaml.cpp enclave because it needs exception to work.
Disable thread_local optimizations in logs.cpp (TODO).
Implement cpu_counter for cpu_threads (moved globals).
2020-03-12 16:03:08 +03:00
Nekotekina
d3eb267ba9
Logs: add 'always' method for debugging
2020-03-10 11:23:56 +03:00
Nekotekina
19107b2de5
logs.cpp: fix log format for backward compatibility
...
Don't add prefix for first messages.
2020-03-07 15:33:07 +03:00
Nekotekina
7599c66639
logs.cpp: print some errors if failed to create logs
2020-03-07 14:38:19 +03:00
Nekotekina
b726aa5a3e
logs.hpp: minor optimization for non-formatting logs
...
Also use single template with CharT to match fmt::format.
2020-03-07 13:52:51 +03:00
Nekotekina
12a3cdf0e8
Move Log.cpp to util/logs.cpp
...
Minor cleanup
2020-03-07 13:31:10 +03:00
Nekotekina
e4a81b1d13
Move Log.h to util/logs.hpp
2020-03-07 12:29:23 +03:00
Nekotekina Aux1
250736ece5
Fix warnings in emucore
2020-03-04 21:23:34 +03:00
Nekotekina
08ab9c4b04
fixed_typemap.hpp: reset creation index to avoid confusion
2020-02-28 00:16:04 +03:00
Nekotekina
4474757162
fixed_typemap.hpp: remove <algorithm> dep in header
...
Create fixed_typemap.cpp
2020-02-28 00:04:37 +03:00
Nekotekina
bacd1698fc
fixed_typemap.hpp: minor cleanup
2020-02-27 23:04:23 +03:00
Nekotekina
d0b2eecc9a
fixed_typemap.hpp: polish move constructor a bit
...
GitHub, plz.
2020-02-27 19:14:08 +03:00
Nekotekina
d5c85f308a
fixed_typemap.hpp: forgot destructor
2020-02-27 13:04:12 +03:00
Nekotekina
f71cdb4eb8
g_fxo: implement logging for object creation/destruction.
...
Only logged at automated phase for initial/final processing.
2020-02-27 13:04:12 +03:00
Nekotekina
5e59f18720
fixed_typemap: implement need<> method
...
It may be used in constructors of other objects to assert a dependency.
It also helps to ensure reverse destruction order of that dependency.
2020-02-26 21:23:30 +03:00
Nekotekina
4e33ae319b
fixed_typemap.hpp: minor fixup
2020-02-25 18:27:05 +03:00
Nekotekina
136d769895
Fix g_fxo->init internal logic for CTAD (use () not {})
...
Also improve comments to the functions.
2020-02-25 14:34:06 +03:00
Nekotekina
9c9c2eb2c9
Fix wrong g_fxo->init_crtp name, use just init<>
2020-02-25 14:07:50 +03:00