Commit graph

86 commits

Author SHA1 Message Date
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
Nekotekina fa02a04baa Add g_fxo->init_crtp to simplify thread construction 2020-02-25 11:51:41 +03:00
Nekotekina 3e0e1f668c Another attempt to fix OSX 2020-02-20 16:54:56 +03:00
Nekotekina 92e3eaf3ff Fix signed-unsigned comparisons and mark warning as error (part 2). 2020-02-19 22:54:58 +03:00
Nekotekina 6e7fbc5c5c endian.hpp: fix zero array warning 2020-02-17 22:00:00 +03:00
Nekotekina 6a1a0bf48d Use std::endian for endianness test
Remove legacy IS_LE_MACHINE IS_BE_MACHINE macro.
2020-02-17 21:33:24 +03:00
Eladash ddf87864de atomic_t: Fix regression from #7489 2020-02-15 14:07:52 +03:00
Eladash eb8710d3c1 atomic.hpp: C-style casts cleanup 2020-02-15 11:37:13 +03:00
Nekotekina 5a41d75eb8 Silence unused parameter warning 2020-02-10 14:47:12 +03:00
Nekotekina 7ea4eb0095 Atomic fix
Fix possible pointer arithmetic ops.
Fix fat atomics (currently unused).
2020-02-09 14:09:29 +03:00
Nekotekina c0f80cfe7a Use attributes for LIKELY/UNLIKELY
Remove LIKELY/UNLIKELY macro.
2020-02-05 10:42:34 +03:00
Nekotekina 1a78e0e80c Make RPCS3 compile in C++2a mode 2020-02-04 23:43:55 +03:00
Nekotekina 59a0f810b9 Implement fat atomics
Atomics with embedded mutex bit.
2020-01-31 12:09:52 +03:00
Silent 9f678cc47a Fix code relying on initialization order
Allows Debug - LLVM to boot
2020-01-31 11:23:55 +03:00
Nekotekina 0147bc2c72 Fixup shared_cptr, atomic_cptr 2020-01-20 21:51:28 +03:00
Nekotekina 1e7a02badb Implement shared_cptr and atomic_cptr
Limited shared_ptr with atomic support.
Atomic version is only partially implemented.
2020-01-20 16:53:42 +03:00
Nekotekina 28eacc616a C-style cast cleanup III 2019-12-01 00:32:44 +03:00
Nekotekina abbf3c4d16 SPU LLVM: add SPU profiling to compilation thread
Run another thread to collect profile data from SPU threads.
Use this data to prioritize compiling hot spot SPU blocks.
Implement stx::init_mutex::wait_for_initialized() helper.
2019-11-11 23:13:13 +03:00
Nekotekina 531afe0f97 atomic2: fix pessimisations 2019-11-04 22:53:26 +03:00
Nekotekina ec25deed2b atomic2: fix corruption bug 2019-11-04 22:52:45 +03:00
Nekotekina be306afae9 atomic2: add TSX path for multi_cas 2019-11-04 22:52:24 +03:00
Nekotekina 35249d2578 Implement multi_cas with atomic2 type
stx::atomic2 is a "fat atomic" for use with multi_cas.
stx::multi_cas is minimal transaction routine.
2019-11-01 20:41:16 +03:00
Nekotekina ec1ea466fd atomic.hpp: fix typo 2019-10-23 16:01:14 +03:00
Nekotekina b844cd81e8 atomic.hpp: remove <string> dependency 2019-10-20 23:06:17 +03:00
Nekotekina 2dde133e1f atomic.hpp: fix internal resource deallocation
Also remove debug printf.
2019-10-20 23:06:17 +03:00
Nekotekina 4d46e66833 atomic.hpp: improve internal data layout
Put semaphore control variable together in hashtable.
Avoid unnecessary allocation of extents.
2019-10-20 20:08:09 +03:00
Nekotekina 56b310ebac atomic.hpp: reimplement USE_FUTEX path for Linux 2019-10-20 20:05:36 +03:00