Nekotekina
87af905018
Enable -Wunused-parameter
2021-03-06 18:07:08 +03:00
Nekotekina
db8e6fe7a7
Enable -Wunused-variable
2021-01-12 14:34:14 +03:00
Nekotekina
5227e65808
vm: implement vm::atomic_op, fetch_op helpers
...
Can help to reduce lambda depth hell a little.
2020-12-30 20:11:02 +03:00
Nekotekina
6b96807112
Reimplement utils::popcnt64
...
Implement utils::popcnt128
2020-12-29 15:28:02 +03:00
Nekotekina
bd269bccaf
types.hpp: remove intrinsic includes
...
Replace v128 with u128 in some places.
Removed some unused files.
2020-12-21 21:11:25 +03:00
Nekotekina
e321765c54
Split BEType.h to util/v128.hpp and util/to_endian.hpp
2020-12-13 16:34:45 +03:00
Nekotekina
36c8654fb8
Remove HERE macro
...
Some cleanup.
Add location to some functions.
2020-12-10 12:30:22 +03:00
Nekotekina
5d934c8759
Improve narrow() and size32() with src_loc detection
2020-12-09 16:26:20 +03:00
Nekotekina
e055d16b2c
Replace verify() with ensure() with auto src location.
...
Expression ensure(x) returns x.
Using comma operator removed.
2020-12-09 15:43:38 +03:00
Nekotekina
eb66302907
atomic.hpp: replace std::atomic with atomic_t
...
Dual dependency is nothing good.
2020-12-07 17:13:12 +03:00
Nekotekina
b16cc618b5
atomic.hpp: add some features and optimizations
...
Add atomic_t<>::observe() (relaxed load)
Add atomic_fence_XXX() (barrier functions)
Get rid of MFENCE instruction, replace with no-op LOCK OR on stack.
Remove <atomic> dependence from stdafx.h and relevant headers.
2020-12-07 17:13:12 +03:00
RipleyTom
af8c661a64
Remove BOM markers
2020-12-06 15:30:12 +03:00
Nekotekina
8efc22bd45
atomic.hpp: simplify and unify bit test instructions
...
Also make them available on all platform.
Rename some rare methods.
2020-12-04 14:33:38 +03:00
Nekotekina
86fc842c89
TSX: new fallback method (time-based)
...
Basically, using timestamp counter.
Rewritten vm::reservation_op with the same principle.
Rewritten another transaction helper.
Add two new settings for configuring fallbacks.
Two limits are specified in nanoseconds (first and second).
Fix PUTLLC reload logic (prevent reusing garbage).
2020-10-31 15:34:14 +03:00
Nekotekina
ba26e16411
Rename vm::reservation_light_op -> light_op
...
Rename vm::reservation_peek_op -> peek_op
Also remove overkill assertion for cpu_flag::temp.
2020-10-31 15:08:49 +03:00
Megamouse
2cee26c3e7
Cleanup some includes
2020-10-31 11:53:46 +01:00
Nekotekina
605d57c541
sys_event: cleanup (replace vm::temporary_unlock)
...
Also made minor changes in sys_rsx.cpp.
Removed unused exception std headers.
2020-10-30 17:49:07 +03:00
Nekotekina
13de773486
Remove some vm::reservation_lock instances
2020-10-27 17:56:19 +03:00
Eladash
1e7bf218e0
CellSpurs: Minor fixes
2020-10-25 16:43:38 +03:00
Eladash
5185ddb8b5
CellSpurs: JobChain functions and some more ( #9080 )
2020-10-16 18:35:20 +01:00
Nekotekina
346a1d4433
vm: rewrite reservation bits
...
Implement classic unique/shared locking concept.
Implement vm::reservation_light_op.
2020-10-10 13:58:48 +03:00
Nekotekina
89f1248140
Implement vm::reservation_op
...
Implement vm::reservation_peek (memory load)
Implement vm::unsafe_ptr_cast helper
Example use in cellSpurs.cpp
Fix dma_lockb value and description
2020-10-07 20:11:59 +03:00
Eladash
c628147521
cellSpurs: Implement more HLE functions (part 1)
2020-10-07 01:12:21 +03:00
Eladash
a5cff8b186
kernel-explorer: Initial SPURS debugger
2020-10-06 14:20:23 +03:00
Eladash
2a258dc21e
Fix GCC compilation ( #9035 )
2020-10-05 06:39:56 +01:00
Eladash
ec1244bb82
Minor cellSpurs fixup
2020-10-04 19:54:56 +03:00
Eladash
a0b387e0a9
cellSpurs: Fix HLE workload signalling, taskset fixes
2020-10-03 22:35:59 +03:00
Eladash
1f28bee86a
cellSpurs: Add error codes formatting (unused)
2020-10-01 18:16:13 +03:00
Eladash
aed560b630
Implemnt various HLE CellSpurs functions
2020-10-01 18:16:13 +03:00
Eladash
019d2d5dcf
Implement HLE cellSpursAddUrgentCommand
2020-08-27 23:52:37 +01:00
Eladash
9cb4402c16
Make error_code::value member private
2020-06-27 09:02:55 +01:00
Nekotekina
f72af2973d
Replace utils::popcnt32 with std::popcount
...
Cleanup includes.
2020-04-14 16:05:58 +03:00
Nekotekina
032e7c0491
Replace utils::cntlz{32,64} with std::countl_zero
2020-04-14 16:05:58 +03:00
Nekotekina Aux1
250736ece5
Fix warnings in emucore
2020-03-04 21:23:34 +03:00
Nekotekina
92e3eaf3ff
Fix signed-unsigned comparisons and mark warning as error (part 2).
2020-02-19 22:54:58 +03:00
Nekotekina
771eff273b
First part of fixing sign-compare warning (inside be_t).
2020-02-19 22:54:58 +03:00
Megamouse
fe75311be2
move config structs to own files and clean up some headers
2020-02-17 15:08:17 +03:00
Eladash
01035d35bd
sys_process: Fix sys_process_get_id, add error_code ( #7246 )
2020-01-14 21:32:41 +03:00
Eladash
9690854e58
Some cleanup
...
* Prefer default initializer over std::memset 0 when possible and more readable.
* Use std::format in trophy files name obtaining.
* Use vm::ptr<>::operator bool() instead of comparing vm::ptr to vm::null or using addr().
* Add a few std::memset calls in hle where it matters (or in some places just to document an actual firmware memcpy call).
2019-12-31 22:27:27 +03:00
Nekotekina
321f7e7197
Fix missing-braces warnings
2019-12-13 03:21:43 +03:00
Nekotekina
185c067d5b
C-style cast cleanup V
2019-12-03 17:23:00 +03:00
Eladash
4b82006984
ppu: Improve LWSYNC
...
Block load<->load reordering as real lwsync.
2019-08-13 04:56:00 +03:00
Nekotekina
cfa1416d64
sys_spu: add vm::temporary_unlock
2019-07-14 18:33:23 +03:00
Nekotekina
bc1617758c
sys_semaphore: add vm::temporary_unlock
2019-07-14 18:18:03 +03:00
Nekotekina
0a88a23bf5
sys_event: add vm::temporary_unlock
2019-07-14 18:06:02 +03:00
Eladash
6fba3dd90c
Misc correctness improvement
...
Use let_<u64> for name_64 and prefer it when possible.
2019-07-09 11:52:34 +03:00
Eladash
43f919c04b
Fixup after #6143 ( #6146 )
...
vm::spu max address was overflowing resulting in issues, so cast to u64 where needed. Fixes #6145 .
Use vm::get_addr instead of manually substructing vm::base(0) from pointer in texture cache code.
Prefer std::atomic_thread_fence over _mm_?fence(), adjust usage to be more correct.
Used sequantially consistent ordering in semaphore_release for TSX path as well.
Improved memory ordering for sys_rsx_context_iounmap/map.
Fixed sync bugs in HLE gcm because of not using atomic instructions.
Use release memory barrier in lwsync for PPU LLVM, according to this xbox360 programming guide lwsync is a hw release memory barrier.
Also use release barrier where lwsync was originally used in liblv2 sys_lwmutex and cellSync.
Use acquire barrier for isync instruction, see https://devblogs.microsoft.com/oldnewthing/20180814-00/?p=99485
2019-06-29 18:48:42 +03:00
Nekotekina
d021d9e14a
sys_mutex: add vm::temporary_unlock
2019-06-19 20:39:39 +03:00
Nekotekina
89a31292dc
sys_cond: add vm::temporary_unlock
2019-06-19 20:39:29 +03:00
eladash
84d42ecb65
Add EFAULT checks to spu_thread_group_join, ppu_thread_join
...
Order of checks is based on firmware
2019-02-10 00:16:57 +03:00