Commit graph

124 commits

Author SHA1 Message Date
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 db9b7db531 Cleanup and move sysinfo.h -> util/sysinfo.hpp 2020-12-18 12:55:54 +03:00
Eladash bfe1a8673a PPU: Allow HLE execution from pure instruction decoder type interpreter 2020-12-15 11:18:51 +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 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 1c99a2e7fb vm: add map_self() method to utils::shm
Add complementary unmap_self() method.
Move VirtualMemory to util/vm.hpp
Minor associated include cleanup.
Move asm.h to util/asm.hpp
2020-11-08 16:43:15 +03:00
Eladash 443c2b920d PPU: Handle cache line inconsistencies (PPU 128 reservations) 2020-10-16 22:51:30 +03:00
Nekotekina 1885e4345c Improve vm::reservation_update
Only respect unique lock.
2020-10-11 17:22:28 +03:00
Eladash 09cddc84be SPU/PPU: Implement Atomic Cache Line Stores 2020-09-27 20:09:21 +03:00
Eladash 73d23eb6e6
SPU: Implement Accurate DMA (#8822) 2020-09-02 23:58:29 +02:00
Eladash 70fb5712e5 PPU interpreters: Fix VMAXFP NaN and signed zeroes handling 2020-08-03 15:43:00 +01:00
Eladash da44d5f10d
PPU: Fix DIVW, DIVWU, MULHW, MULLW, MULHWU when op.rc is set (#8630) 2020-07-25 17:13:58 +01:00
Eladash 917069e31a
PPU Precise/LLVM: Support NJ modes (#8617) 2020-07-25 07:41:41 +01:00
Eladash 0bf8f2a527 PPU interpreters: Fix VRFIM, VRFIN, VRFIP, VRFIZ 2020-06-11 14:31:38 +03:00
Nekotekina 5d27f1c732 PPU: implement VNMSUBFP (precise variant) 2020-06-07 22:44:07 +03:00
Nekotekina 3b8e7d0967 Implement v128::fma32f 2020-06-07 22:44:07 +03:00
Eladash f0cdd8ace6 PPU: Implement PPU Traps Stubbing option 2020-05-27 22:39:29 +03:00
Eladash 201d54ee08 PPU interpreters: Implement AltiVec NaNs precedence and data preservation 2020-05-18 00:35:06 +03:00
Nick Renieris 20d8d38e53 PPU Interpreter: Accurate vector instruction NaNs
Tested with https://github.com/RPCS3/ps3autotests/tree/master/tests/cpu/ppu_vpu.
This commit gets us from 2746 to 353 different lines compared to realhw.
2020-05-14 11:14:28 +01:00
Nekotekina b1b67a13c6 Revert "Replace rotate utils with std::rotl" (partial)
This reverts commit 4d8bfe328b.
2020-04-14 19:45:53 +03:00
Nekotekina 4d8bfe328b Replace rotate utils with std::rotl
More include cleanup.
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 471db3219d Finalize constexpr ppu_decoder<> thing
Move SSSE3 checks to runtime in PPUInterpreter.cpp
2020-03-25 11:18:48 +03:00
Eladash e1cb827488 PPU Precise: Fix FMADDS, FMSUBS, FNMSUBS, FNMADDS 2020-03-21 16:32:09 +03:00
Nekotekina Aux1 250736ece5 Fix warnings in emucore 2020-03-04 21:23:34 +03:00
Nekotekina 5e75a0c497 Disable cotire on travis
Make some workarounds for clang because it poorly supports -Wold-style-cast
2020-02-21 17:03:54 +03:00
Nekotekina 92e3eaf3ff Fix signed-unsigned comparisons and mark warning as error (part 2). 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
Nekotekina c0f80cfe7a Use attributes for LIKELY/UNLIKELY
Remove LIKELY/UNLIKELY macro.
2020-02-05 10:42:34 +03:00
Nekotekina 327bb2d8f0 Modernize PPU logging (ppu_log variable) 2020-02-01 11:52:24 +03:00
Eladash 923cd7ad72 SPU LLVM: rewrite comparison on non-xfloat path of CFLTU, CFLTS
CFLTU on non-xfloat path is accurate as xfloat path now.
* Also optimize FCTIW like FCTIWZ (PPU)
2019-12-30 22:20:34 +03:00
Eladash 6a4ba9d562 Fix warning about truncation 2019-12-07 10:22:11 +01:00
Nekotekina ad9c9f0183 C-style cast cleanup II 2019-11-30 18:17:45 +03:00
Nekotekina 6ea02c23a0 Fix SSSE3 usage in PPUInterpreter.cpp
Fixup
2019-11-09 20:39:56 +03:00
Eladash c16319f959 PPU Precise: Fix fused float ops misaccuracy by using fma
Also cleanup add64_flags, remove redundent copy of s_ppu_itype.
2019-10-20 20:58:31 +03:00
Nekotekina 0c69b7da8f Fix ppu_interpreter::MTFSFI
Out of bounds error.
2019-09-08 14:50:50 +03:00
isJuhn aaae437ca3 PPUInterpreter.cpp: remove SSE4.1 requirement in FCTIWZ, FCTID and FCTIDZ 2019-09-04 14:05:33 +03:00
eladash 0af342a978 PPU Precise: FPCC handling on float ops implemented 2019-08-18 04:01:16 +03:00
Eladash 19825366f5 Fixup for fixup 2019-08-13 17:55:45 +01:00
Eladash 6d0f2ae58a ppu interpreter: Improve SRD/SLD 2019-08-13 04:56:00 +03:00
Eladash a560498cd4 ppu: Improve FCTIW, FCTIWZ, FCTID and FCTIDZ 2019-08-13 04:56:00 +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
Eladash 1ee7b91646 Refactoring (#6143)
Prefer vm::ptr<>::ptr over vm::get_addr.
    Prefer vm::_ptr/base over vm::g_base_addr with offset.
    Added methods atomic_t<>::bts and atomic_t<>::btr .
    Removed obsolute rsx:🧵:Read/WriteIO32 methods.
    Removed wrong check in semaphore_release.
    Added handling for PUTRx commands for RawSPU MFC proxy.
    Prefer overloaded methods of v128 instead of _mm_... in VPKSHUS ppu interpreter precise.
    Fixed more potential overflows that may result in wrong behaviour.
    Added io/size alignment check for sys_rsx_context_iounmap.
    Added rsx::constants::local_mem_base which represents RSX local memory base address.
    Removed obsolute rsx:🧵:main_mem_addr/ioSize/ioAddress members.
2019-06-29 01:27:49 +03:00
JohnHolmesII ebb1ae6408 Properly ignore SIMD macros to avoid warning 2019-06-28 01:40:52 +03:00
Lassi Hämäläinen c963c51a60 Remove unnecessary header includes
- Manually removed lot of unneeded #includes to clean code and reduce
  compilation time
- Reordered some of the #includes to be in more logical order
2019-06-25 17:11:10 +03:00
Lassi Hämäläinen 499035512b Split Emu/Memory into more logical headers
- Add vm_locking.h and vm_reservation.h and move relevant functions
  and types to these headers.
- Change include order and make vm_ptr.h, vm_var.h and vm_ref.h headers
  usable invidually and them including vm.h instead of other way around
- Because usage of vm::ptr now requires including vm_ptr.h instead of
  vm.h updated multiple #includes
- Added additional #includes to vm_reservation.h and vm_locking to
  where vm::reservation_* and locking related functions are used
2019-06-25 17:11:10 +03:00