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
Nekotekina
e0f60c5dce
atomic.hpp: rewrite collision handling
...
Remove "fallback" code path.
Remove USE_FUTEX code path temporarily.
2019-10-20 18:29:20 +03:00
Nekotekina
59382e023d
Compilation fix
2019-10-19 14:08:21 +03:00
Nekotekina
2446bb5d40
init_mutex: implement init_always()
2019-10-19 14:01:34 +03:00
Nekotekina
db7042b986
Restore using keyed events in waitable atomics on Windows
2019-10-18 23:08:00 +03:00
Nekotekina
9ae08946ac
g_fxo: destroy objects in reverse creation order
...
Maintain creation order internally.
2019-10-12 20:58:36 +03:00
Nekotekina
86fb2993ad
Minor fixup for se_t operators &= |= ^=
2019-10-06 13:33:50 +03:00
Nekotekina
f83385926b
Implement optimized operators &|^ for se_t
2019-09-30 22:32:39 +03:00
Nekotekina
e56ffc1e69
Implement optimized operator~ for se_t<>
2019-09-30 22:26:34 +03:00
Nekotekina
5f29840348
Fix enum vs integer comparison in se_t::operator==
...
Need to convert left part to its underlying type.
2019-09-30 22:26:34 +03:00
Nekotekina
0f567abdd8
Restore experimental optimized operators &= |= ^= for se_t
...
They were removed approximately 3 years ago due to their rarity.
2019-09-30 22:26:34 +03:00
Nekotekina
046f8510fa
Restore experimental optimized operators == != for se_t<>
2019-09-28 15:39:50 +03:00
Nekotekina
bd1a24b894
Tidy endianness support (se_t) implementation
...
Move se_t and se_storage to util/endian.hpp
Use single template instead of two specializations.
Add minor optimization for MSVC.
Remove v128 dependency.
Try to enable intrinsics for unaligned data.
Fix minor bug in u16/u32/u64 specializations.
2019-09-28 15:39:50 +03:00
Nekotekina
9710473a2e
atomic.hpp: use native semaphores on Windows
...
Windows: drop keyed events
Linux: keep using native futex
Implement unused POSIX semaphore path
Implement fallback semaphore with pure std (OSX, BSD, etc)
2019-09-24 05:01:00 +03:00
Nekotekina
95c939f014
atomic.hpp: fix pointer mask
2019-09-24 05:01:00 +03:00
Nekotekina
74471e8ea3
atomic.hpp: fixup for atomic waiting
2019-09-24 05:01:00 +03:00
Nekotekina
17d764409e
Add init_mutex.hpp
...
Pseudo-mutex to protect initialization and finalization
2019-09-19 02:16:14 +03:00
Nekotekina
3092914527
typeindices.hpp: add typeindex() helper
2019-09-19 02:16:14 +03:00
Nekotekina
c7bf6421f4
typeindices.hpp: rename typeinfo_v to typelist_v
2019-09-19 02:16:14 +03:00
Nekotekina
be61499790
typeindices.hpp: fix constexpr constructor
...
Serious bug...
2019-09-19 02:16:14 +03:00
Nekotekina
8054735cab
Fix manual_fixed_typemap::init result (g_fxo)
...
Return uncasted pointer to created type
2019-09-19 02:16:14 +03:00
Nekotekina
e982871ab5
atomic.hpp: increase hashtable capacity
...
Double size and ignore 2 lowest bits (effectively x8)
2019-09-13 15:53:34 +03:00
Nekotekina
2fc8844315
atomic.hpp: add atomic wait mask support
2019-09-13 15:53:34 +03:00
Nekotekina
4504ac2d12
atomic.hpp: implement collision fallback properly
...
Should prevent devastating effect of collisions
2019-09-10 19:25:39 +03:00
Nekotekina
67f31c17d1
atomic.hpp: fix signal saturation logic
...
Make sure to notify_all at max signal count.
2019-09-10 19:25:39 +03:00
Nekotekina
a808c2aaf6
atomic.hpp: optimize internal logic
...
Move waiter count to highest bits to prevent false futex wakeups.
Test pointer bits properly in notify_all to avoid false wakeups.
2019-09-10 19:25:39 +03:00