Elad Ashkenazi
5a0a5d9ff1
vm.cpp: Fix emulation stopping on SPU access violation ( #12586 )
2022-09-01 18:23:18 +03:00
Eladash
ddba30988b
vm: Attempt to not remove cpu_flag::wait flag during access violation
2022-08-21 15:02:01 +03:00
Nekotekina
7bb2d94e53
vm: use sparse files to emulate overcommit memory
...
Fix shm::map_critical page flags.
2022-08-12 13:59:03 +03:00
Eladash
34bae90820
LV2: Move nearly all notifications out of all mutex scopes including IDM
2022-08-07 20:23:54 +03:00
Eladash
cf77bb7cfc
Savestates/MSVC: Replace bugged std::unique (compiler bug)
2022-08-03 15:35:41 +03:00
Eladash
2b3ae8b638
Revert another change
2022-07-20 18:11:52 +03:00
Eladash
314d481dcd
Savestates: Fix typo in page size setting
2022-07-08 12:57:43 +03:00
Eladash
f546e5a8ef
VM/Savestates: Replace bugged read-only block optimization
2022-07-06 19:43:25 +03:00
Eladash
b692108f1e
Savestates: HLE state saving POC in sys_lwmutex
2022-07-06 19:43:25 +03:00
Elad Ashkenazi
fcd297ffb2
Savestates Support For PS3 Emulation ( #10478 )
2022-07-04 16:02:17 +03:00
Eladash
64399d45c1
vm: Make falloc return value bool
...
Allow to check properly for the success of 0 address allocation.
2022-06-22 21:01:37 +03:00
Elad Ashkenazi
1738b38536
vm_native.cpp: Use Windows 10 memory mapping API (the correct API)
2022-06-10 14:27:02 +03:00
Nekotekina
422246825b
vm: workaround bigger native page size for 4k pages
...
Always allocate full memory block if native page size > 4k
2022-06-02 12:56:49 +03:00
Eladash
fcbeb2fa22
Remove slow vm::writer_lock usage from SPUThread.cpp
2022-05-04 23:36:57 +03:00
Nekotekina
5c1f79ab26
vm: remove g_mutex, use g_range_lock instead
...
Simplification and performance improvements.
2022-05-02 10:29:28 +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
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
Eladash
50ad7ba1f6
vm: Fix vm::unmap
...
* Make vm::unmap atomic, squash the memory unmapping process inside this function while still using the same VM mutex ownership.
* Make vm::unmap not fail due to random vm::get calls, shared_ptr reference count is no longer a condition.
* Fix sys_mmapper_free_address spuriously failing with EBUSY due to random vm::get calls.
* Fix sys_vm_unmap race condition due to non-atomic vm::unmap.
* Add an optional verification block ptr arg to vm::unmap, used by patches.
2021-09-13 20:53:34 +03:00
Eladash
91fefd4671
Fix vm::try_alloc regression
2021-09-12 19:05:26 +03:00
Eladash
fafefb2cf5
Fixup No.3 after #10779
2021-09-10 11:46:39 +03:00
Eladash
b40ed5bdb7
Patches/PPU: Extend and improve patching capabilities (code allocations, jumps to any address) ( #10779 )
...
* Patches/PPU: Implement dynamic code allocation + Any-Address jump patches
Also fix deallocation path of fixed allocation patches.
2021-09-01 13:38:17 +03:00
Eladash
2d9929059f
vm: Fix an overflow at vm::alloc, fix vm::find_map ( #10760 )
...
* The statement addr += align could have overflowed resulting in either infinite loop or allocating memory outside of the region (illegal).
Add a check checking if it's the last iteration of the loop, then break without adding.
* vm::find_map condition didn't consider the size of the map to be allocated, allowing illegal occupation of [<=0xB000'0000]-0xCFFF'FFFF. (0xC000'0000-0xCFFF'FFFF is reserved for RSX)
2021-08-26 18:14:08 +03:00
Eladash
4e139ee080
vm: Fix vm::page_protect error checking
2021-08-24 18:52:01 +03:00
Nekotekina
2491aad6f2
types.hpp: implement min_v<>, max_v<>, SignedInt, UnsignedInt, FPInt concepts
...
Restrict smax to only work with signed values for consistency.
Cleanup <climits> includes.
Cleanup <limits> includes.
2021-05-23 19:43:51 +03:00
Nekotekina
0bd64a0e72
Don't fatal on sparse file initialization failure
...
Also try two different locations (Win32).
2021-05-10 00:39:28 +03:00
Nekotekina
e24ada37bf
fs: implement fs::get_temp_dir() (Win32)
...
Trying to workaround issues with sparse files (#10231 )
2021-05-05 19:38:36 +03:00
Nekotekina
546b52200b
vm: disable locking main/video/stack for now (TODO)
2021-05-04 19:18:57 +03:00
Nekotekina
1b0b2fe21e
vm: add "hook" memory (32G)
...
Implement overcommit emulation for shm.
2021-05-04 18:02:52 +03:00
Nekotekina
7a9561b966
vm_native: document some unmap_critical behaviour (posix)
2021-04-18 13:13:15 +03:00
Megamouse
a16d8ba3ea
More random changes
2021-04-11 14:01:51 +03:00
Nekotekina
95725bf7fc
Add -Werror=missing-noreturn (GCC, clang)
...
May be useful to diagnose functions which fail assertions unconditionally.
2021-04-08 10:29:47 +03:00
Nick Renieris
396c129d41
vm: Flag names (refactoring)
2021-04-06 13:07:54 +03:00
Nekotekina
5dc3467337
vm: fix reservation_update notification
...
Rare function.
2021-03-23 21:09:37 +03:00
Eladash
1864419561
Fix SPU mapped memory page size
2021-03-19 22:25:08 +03:00
Nekotekina
87af905018
Enable -Wunused-parameter
2021-03-06 18:07:08 +03:00
Eladash
004ebfdaee
SPU debugger: Implement MFC journal
...
* Allow to dump up to 1820 commands with up 128 bytes of data each, using key D with the debugger.
2021-03-02 21:57:51 +03:00
Nekotekina
ea5e837bd6
fixed_typemap.hpp: return reference
2021-03-02 16:08:14 +03:00
Nekotekina
d788b12a8e
fixed_typemap.hpp: reduce indirection
...
Backported some changes from auto_typemap.hpp
Implemented methods init(), reset(), clear()
Disabled recreation support.
2021-03-02 16:08:14 +03:00
Eladash
73d45f3bf0
Remove vm::cleanup_unlock
2021-02-22 12:47:45 +03:00
Eladash
5b044a93c1
Fix vm::falloc() for misaligned args ( #9764 )
...
Force addr/size alignment.
2021-02-14 13:19:14 +03:00
Eladash
0652870204
New RSX Debugger
2021-01-28 17:40:26 +03:00
Nekotekina
a69248299d
SPU: Don't use shm::map_critical in SPU LS allocations
...
Use shm::try_map instead until proper area is found.
2021-01-25 17:45:47 +03:00
Nekotekina
aaaeb66cc8
vm: Minor fix in vm::close
...
Supplied size was wrong.
2021-01-15 20:12:30 +03:00
Eladash
e4c3b1c2bd
vm: Remove vm::dealloc_verbose_nothrow
2021-01-15 17:37:52 +03:00
Nekotekina
db8e6fe7a7
Enable -Wunused-variable
2021-01-12 14:34:14 +03:00
Eladash
66581d115b
vm: Fix access violations on super memory, support super memory in vm::get_addr
2020-12-26 17:56:49 +03:00
Nekotekina
567d23d856
Implement util/auto_typemap.hpp
...
Used in vm::block_t as an example.
2020-12-24 14:55:25 +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
eec11bfba9
Move align helpers to util/asm.hpp
...
Also add some files:
GLTextureCache.cpp
VKTextureCache.cpp
2020-12-18 18:07:42 +03:00
Nekotekina
fb29933d3d
Add usz alias for std::size_t
2020-12-18 12:23:53 +03:00