feat(ps5lift): add ps5lift, a static recompiler for PS5 executables #15806
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15806"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by oberonlift on 2026-11-04T16:24:15Z.
Merge after #15798 and #15805. Until they merge, this PR also shows #15797's and #15798's changes; oberonlift/AnyPS5#15 shows only its own.
ps5lift is a static recompiler for PS5 executables: it lifts a game's x86-64 code to LLVM IR and compiles it ahead of time to aarch64, which runs on Linux against AnyPS5's own libraries with no interpreter or JIT. It runs AnyPS5's PS5-style test programs and a homebrew media player to its home screen; commercial games are not playable yet. Branch
ps5lift-previewmerges all of its PRs (how to try it); native Apple Silicon support is coming along fast. It is a separate approach from the ARM64 compiler in #5021; #1835 has an introduction.This is the lifter itself. It needs only its runtime, #15798, and #15805 for the convention check; a follow-up connects it to AnyPS5's libraries, which #15797 and #15799 to #15804 make build for a lifted program.
What
ps5lift lifts a PS5 executable's x86-64 code to LLVM IR and compiles it to native code, so the program runs on an aarch64 Linux host without an x86 emulator.
ps5lift/lifter): reads the image with AnyPS5's ELF reader, finds the functions with Zydis from the entry point, exports, relocation targets and.eh_frame, recovers jump tables, lifts each function to an LLVM function over the guest register state and compiles the program in parts, a thread each. By default it keeps x86 memory ordering with acquire loads and release stores and reproduces x86's floating-point results bit for bit.retpopped.setjmp, threads, callbacks and modules, are lifted at -O0 to -O3 and their output compared with the native programs'. Further tests check that the runtime is linked again after an interrupted build and that a runtime built for a CPU without SVE contains no SVE instructions. On a host other than Linux the tests only lift.tools/ps5lift.pyruns the test programs, builds the runtime for the CPU the lifted code targets and times a memory benchmark natively and lifted.docs/dev/PS5LIFT.mdsays how to build and use ps5lift,docs/dev/PS5LIFT_DESIGN.mddescribes its design and implementation, and its known gaps are a ps5lift section of the technical debt.find_package(LLVM)inps5lift/CMakeLists.txt). #15805 lets the convention check accept that; until it merges, this is the one line the check reports.Tested
On a DGX Spark (aarch64 Linux, NVIDIA GB10, LLVM 18), built from current
mainwith #15797, #15798 and this PR: all 55 tests pass. The convention check passes with #15805's script, and withmain's reports only the LLVM line.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Pull request closed