Commit graph

1916 commits

Author SHA1 Message Date
Nekotekina
2ade3c594c LLVM DSL: expression matching (preview 2)
Implement more instructions.
2019-04-25 03:33:18 +03:00
Nekotekina
8754bbd444 SPU LLVM: add match_vr<> template
Returns reg value only if type is compatible, avoiding bitcast.
2019-04-24 23:55:41 +03:00
Nekotekina
dd9bd1338b SPU LLVM: add get_vrs<> template 2019-04-24 23:55:41 +03:00
Nekotekina
3e0b45719d LLVM DSL: rewrite zshuffle, shuffle2, build
Add llvm_const_vector template.
2019-04-24 23:55:41 +03:00
Nekotekina
b02503963e LLVM DSL: rewrite splat, fsplat, vsplat
Add llvm_const_float and llvm_splat templates.
2019-04-24 23:55:41 +03:00
Nekotekina
c83e65f29e LLVM DSL: rewrite extract and insert 2019-04-24 23:55:41 +03:00
Nekotekina
b7b93eae13 SPU LLVM: minor bitcast cleanup
Remove redundant explicit constand propagation in some instructions.
2019-04-24 23:55:41 +03:00
Nekotekina
ac473eb400 Rewrite cpu_translator::rol, add fshl and fshr
Use new funnel shift intrinsics
2019-04-24 23:55:41 +03:00
Nekotekina
42448cf3e5 Remove cpu_translator::scarry, cpu_translator::merge 2019-04-24 23:55:41 +03:00
Nekotekina
524aac75ed LLVM DSL: rewrite bitcast, zext, sext, trunc, select, min, max ops
Are made composable in expressions similar to arithmetic ops.
Implement noncast in addition to bitcast (no-op case).
Implement bitcast constant folding.
Fixed some misuse of sext<>.
2019-04-24 23:55:41 +03:00
Nekotekina
dc9118ef50 LLVM DSL refactoring
Properly forward value categories in expression structs.
Simplify SFINAE tests (is_llvm_expr, llvm_common_t) in global operators.
Add llvm_const_int and remove llvm_add_const, llvm_sub_const, etc.
Add llvm_ord and llvm_uno for FP comparison via >=< operators.
Replace cpu_translator::fcmp with fcmp_ord and fcmp_uno.
2019-04-24 23:55:41 +03:00
Ani
a24ede4f40 cellPad: Update vendor and product IDs
- Used IDs were not from the Guitar Hero instruments but in fact from the Rock Band ones. Sets the correct Guitar Hero IDs and adds the Rock Band ones on comments. TODO: Allow selecting the specific devices on the PAD Settings.
- Adds DJ Hero Turntable VID/PID.
- Adds Dance Dance Revolution Mat VID/PID.
2019-04-20 23:17:13 +01:00
eladash
3a5f4ed757 Print SPU Group ID on the debugger 2019-04-20 20:43:58 +01:00
eladash
450e2c9a0e cellSaveData: Add missing SDK version check for setParam->reserved2 check 2019-04-20 20:43:58 +01:00
eladash
ae5a4b697e Fix cellSaveDataListAutoSave/Load unk flags 2019-04-20 01:04:41 +03:00
eladash
1e9d3346d1 Reschedule in cellMsgDialogOpen2 2019-04-20 01:04:41 +03:00
eladash
9446bd2d3f Handle a few more cellSaveData errors
* Check directory existence if setParam is NULL (dont create directory)
* Fix mask for reCreateMode
* Check a few setParam fields including reserved buffers.
* Fix sizeKb when the dir is empty except from PARAM.SFO
* Fix error checking when CELL_SAVEDATA_RECREATE_YES is specified but setParam is NULL (Doesnt do anything, simply errors)
2019-04-20 01:04:41 +03:00
eladash
6f76e34104 rsx: Fix race on clearing native_ui vs emu_requested flag 2019-04-20 01:04:41 +03:00
eladash
67f098627a Fix sys_spu group ID 2019-04-20 01:04:41 +03:00
eladash
ff11d9a3bd Improve scheduler control for cellSaveData
TODO: There are probably more spots where we should yield.
A little more at the start because PacketRead is called twice.
Dont use sys_timer_usleep because it will just call this_thread::yield() repeatedly.
2019-04-20 01:04:41 +03:00
eladash
9497270da5 Implement initial arguments error checking for cellSaveData 2019-04-20 01:04:41 +03:00
eladash
2b4bc588dc Put missing check_state() in some places
Fixes a few verification failures while closing the emulator with HLE liblv2
2019-04-20 01:04:41 +03:00
eladash
f25587d24c rsx: Write vblank semahpre, minor semaphore acquire optimization 2019-04-20 01:04:41 +03:00
Nekotekina
7865982208 Fix static_hle log channel definition 2019-04-16 23:49:18 +03:00
Nekotekina
52c589ed3d Revert disabling AVX path in SPU verification.
It was experimental and builds for tests are available in history.
2019-04-16 23:49:18 +03:00
Nekotekina
9060177dbd SPU transactions: add SSE path if AVX is not available
This handles hypothetical situation when AVX is disabled system-wise.
Also refactored register use, to match Windows path with Linux path.
This reduces read set a little at the cost of stack use.
2019-04-16 23:49:18 +03:00
msuih
baf42430d6 Decrease severity of sys_net_bnet_close 2019-04-16 18:39:57 +03:00
Nekotekina
136fc8cfe3 SPU ASMJIT: avoid AVX in verification (experimental) 2019-04-14 18:03:45 +03:00
Nekotekina
c1edae73c5 SPU ASMJIT: move vzeroupper a bit 2019-04-14 15:10:54 +03:00
Nekotekina
8deb20e928 SPU: write cache before compiling 2019-04-13 22:56:11 +03:00
Nekotekina
0d415407c7 sys_fs_unlink: add CELL_EISDIR check 2019-04-12 12:24:36 +03:00
Nekotekina
f40320bcae Fix cellVdecOpen
Use pseudo-address in sys_ppu_thread_create calls
2019-04-11 21:20:22 +03:00
TGEnigma
38cc92ec45 Add _sys_ppu_thread_create and sys_ppu_thread_rename error checks 2019-04-11 18:14:05 +03:00
eladash
8da78c098c SPU LLVM: Fix branch to self at start of block state check 2019-04-11 17:47:52 +03:00
eladash
eba8e2284b SPU LLVM: Fix CFLTU
Clamp properly result from both sides!

TODO: Figure out whats different CreateFPToUi has from CFLTU and why it fails here.
2019-04-11 17:47:52 +03:00
eladash
969af86eba SPU: Implement BISLED
DFCMGT instruction removed, it was wrong to add to begin with

ASMJIT: Fix compilation of double compare instructions, move exception to runtime instead of compiletime!
Jarves confirmed that he implemented this instruction because of that bug with asmjit only, affected God Of War 3
2019-04-11 17:47:52 +03:00
eladash
b307aff9eb Prefetch byteswapped opcodes in ppu interpreter 2019-04-11 17:47:52 +03:00
eladash
1c462abc37 Make sure to update cia when calling in unknown hle table func access 2019-04-11 17:47:52 +03:00
eladash
3304e3b0b7 PPU LLVM: Fix STSWI and LSWI 2019-04-11 17:47:52 +03:00
eladash
f028737db8 Implement fallback for PPU LLVM
This matches with interpreter implementation, fixing unregistered functions in lost cases
2019-04-11 17:47:52 +03:00
eladash
a9014a8cac ppu Fast/Precise: Fix SIMD instructions VSUM2SWS, VPKSWSS, VPKSHUS, VPKSHSS
Also rewrite VPKSHUS for speed.
2019-04-11 17:47:52 +03:00
eladash
e21504d52d ppu interpreter: Improve FPCC field handling 2019-04-11 17:47:52 +03:00
eladash
aa44ef1f44 Fix default PPU nj status
TODO: Support  it...
2019-04-11 17:47:52 +03:00
eladash
d555eeb0f4 Check start status in sys_prx_start/stop_module 2019-04-11 17:47:52 +03:00
Inviuz
52a12185a0 Initial sys_overlay 2019-04-10 23:25:09 +03:00
scribam
1d947daa81 hle: Add some more functions 2019-04-10 22:15:35 +03:00
Nekotekina
40142420c1 Implement vfs::host::unlink
Emulate POSIX behaviour in sys_fs_unlink.
This should allow to delete opened files transparently on Windows.
2019-04-10 13:58:12 +03:00
Nekotekina
9736773c04 Implement vfs::host::rename
With spurious access error workaround
2019-04-10 13:58:12 +03:00
Nekotekina
3354f068fc PPU/SPU transactions: ease cache line interference (TSX path)
Touch memory on the same memory page, but different cache lines.
2019-04-10 13:58:12 +03:00
scribam
f30af3ccd2 hle: Add more missing functions 2019-04-07 23:31:15 +03:00