Commit graph

27 commits

Author SHA1 Message Date
Paris Oplopoios
5004e41100
Patch movntss and movntsd (#3049)
* Patch movntss and movntsd

* clang-format

* Deduplication

* Allow rep to be in other places
2025-06-08 22:29:33 +03:00
Paris Oplopoios
58df609ba0
Optimize games that hit unpatchable EXTRQ/INSERTQ (#2888)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
* Make signal handler faster

* I love clang-format

* Use faster decoding

* MacOS CI
2025-05-08 19:59:12 +03:00
squidbus
806b2ddc89
cpu_patches: Remove CPU patches for macOS and bump minimum OS version to 15.4 (#2743)
* cpu_patches: Remove CPU patches for macOS and bump minimum OS version to 15.4

* cpu_patches: Remove BMI1 patches

These are now only good for very old Intel CPUs that:
* Still do not currently function due to other CPU instruction issues.
* Will probably be too slow to run shadPS4 well.
2025-04-03 22:39:08 +03:00
squidbus
3a9633f553
cpu_patches: Simplify and remove some restrictions on macOS. (#2591) 2025-03-04 13:25:51 +02:00
Paris Oplopoios
7bef4a5c70
Allow our BMI1 emulation to work on non-macOS CPUs - also emulate TZCNT (#2526)
* Allow our BMI1 emulation to work on non-macOS CPUs

* Add TZCNT

* Some changes

* Subtract and add to rsp
2025-03-04 12:40:21 +02:00
Paris Oplopoios
0885d8fce7
Simplify ANDN (#2511) 2025-02-24 02:53:11 -08:00
Paris Oplopoios
07baf17c2a
Save rest of ymms in SaveContext (#2512) 2025-02-23 20:02:52 -08:00
squidbus
0e238c87cb
cpu_patches: Lower extrq/insertq log to trace. (#2386) 2025-02-09 18:58:48 +02:00
squidbus
c89c7e8fed
cpu_patches: Always use AVX for certain patches. (#2274) 2025-01-30 18:17:03 +01:00
Paris Oplopoios
d9f287eaa2
Fix fmt error (#1150) 2024-09-29 14:02:46 +02:00
Paris Oplopoios
65bd62e98b
Reduce assert to a warning (#1115) 2024-09-28 15:44:07 +03:00
Paris Oplopoios
23bf8bf5e7
Patch insertq (#635)
* Patch `insertq`

* Don't clobber flags, fix asserts a bit

* Format code

* Fixup some edge cases

* A couple nits

* Remove extraneous space
2024-09-24 17:03:32 +03:00
Paris Oplopoios
5799091044
Patch extrq (#943)
* Use a singleton for instruction decoding

* Use singleton class

* Patch `EXTRQ`

* Fixup signal context functions

* Update CMakeLists.txt

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2024-09-23 19:19:52 +03:00
squidbus
28ec489dbe
cpu_patches: Revert to ahead-of-time patching on Linux for now. (#949) 2024-09-17 00:53:41 +03:00
squidbus
75a4df53a5
cpu_patches: Patch just-in-time using signal handlers. (#852)
* cpu_patches: Patch just-in-time using illegal instruction handler.

* core: Add common signal dispatch system and use for on-demand TCB patches.

* page_manager: Re-add userfaultfd implementation.
2024-09-15 23:48:34 +03:00
offtkp
f31c92ffd1 Get rid of unnecessary jump 2024-09-04 12:31:12 +03:00
Paris Oplopoios
42ab101908
Set CF correctly on BLSR/BLSMSK patch (#724)
* Set CF correctly on BLSR patch

* Set CF correctly on BLSMSK patch
2024-09-03 21:40:46 +03:00
Paris Oplopoios
cfe49fbfba
Preserve flags on some patched instructions (#720)
* Preserve flags on some patched instructions

* Move flag saving to Save/RestoreContext
2024-09-03 20:41:35 +03:00
Paris Oplopoios
f4ff0d493c
Set CF correctly on BLSI patch (#722)
* Set CF correctly on BLSI patch

* Remove redundant CLC
2024-09-03 20:41:22 +03:00
squidbus
9e5047947b macos: Remove need for TLS patch by storing TCB pointer in FS. 2024-09-01 02:22:42 -07:00
squidbus
61db246c5e core: Fix CPU patch stack issues 2024-08-30 20:47:07 -07:00
squidbus
a17150960f Add patches for F16C instructions under Rosetta 2. 2024-08-29 17:31:25 -07:00
Vinicius Rangel
361412031c
fix tls patch on windows (#328)
* fix tls patch on windows

based on TlsGetValue in kernel32.dll

* fix tls patch on windows for expansion slots
2024-07-27 20:16:21 +03:00
squidbus
615f4e770f Support RIP relative memory operands in patched instructions. 2024-07-21 22:36:12 +03:00
squidbus
26e0fc6ad5 Only patch BMI1 instructions under Rosetta 2. 2024-07-21 22:36:12 +03:00
squidbus
f943ce2710 Address review comments around memory and patches. 2024-07-21 22:36:12 +03:00
squidbus
d9231b239c Migrate TLS patches to new patching system. 2024-07-21 22:36:12 +03:00