Repository navigation
Conversation
31cd065 to
7725ddb
Compare
|
@boykopovar Could you review the architecture and integration of this initial compiler-only ARM64 AOT implementation, related to #1553? It is now ready for review at |
7725ddb to
b7e3f8d
Compare
|
@boykopovar Current head |
b7e3f8d to
a2f4f36
Compare
|
Thanks for the work and for keeping the scope explicit (compiler-only, limits recorded in BUILD/TechnicalDebt). This adds a new area rather than a fix, so it needs a direction call before a code review:
@boykopovar @oneandonlydean: do you want this in-tree at this stage (new submodules, the Apple-only workflow, the long-term ARM64 direction from #1553), or should it live out of tree until a runtime exists? We can't build or run it on Linux, so the claims that depend on macOS/ARM64 (the 212 tests, the emitted code) remain unverified on our side. |
|
I'd keep it out of tree until there's a runtime that runs something with it: we can't build or check it here, and it brings two submodules and an Apple-only workflow with no runnable output yet. The ARM64 direction (#1553) is the owner's call. |
|
Hi all. On @Betr0x's point above, that the condition for taking an ARM64 path into the tree was a runtime that runs something: I have one that does, and it is now up as PRs. ps5lift is a static recompiler for PS5 executables. It lifts a whole executable and its modules from x86-64 to LLVM IR and compiles them ahead of time to aarch64; there is no interpreter or JIT at run time. Its runtime (#15798) is what the recompiled program links: it maps the guest images, dispatches indirect calls, runs x87 code on Berkeley SoftFloat, answers What it runs today, on an NVIDIA DGX Spark (GB10, aarch64 Linux):
The PRs, in merge order. The first eight make AnyPS5's libraries build and run for a lifted program; on x86-64 they leave behaviour unchanged, which I checked by comparing the compiled objects and by running AnyPS5's tests on x86-64 Linux before and after. The last three add the lifter:
Branch This is a different approach from #5021, not a replacement for it, and I'd be glad to coordinate on directory layout, merge order or shared pieces. The first PR gathers the libraries' CPU-specific instructions in one header, which any ARM64 path can extend. Native Apple Silicon support is coming along fast too. Lifted programs already run natively on an M4 Mac, and guest memory now sits away from the address ranges macOS reserves, so games get as far as rendering there. What remains is mostly GPU features MoltenVK lacks, such as shader clocks, which the shader recompiler will emulate. |
What
Retain this PR as the architectural discussion and review record for the experimental offline x86-64 to native ARM64 compiler. The complete implementation is consolidated in #5021, including the runtime and runnable consumers. This draft preserves the original review context; it is not a second implementation to merge or a dependency that must land before #5021.
The architectural constraints remain native ARM64 AOT output, reuse of AnyPS5 platform services, explicit input/ABI/effect qualification and rejection of unsupported cases. The shipped executable contains no x86 interpreter, JIT or Rosetta dependency. The original proposal's typed native-call compiler and the broader guest-state compatibility backend have distinct qualified scopes; recovering native values and effects across caller chains remains the direction for further simplification and performance work.
The existing request for a runnable end-to-end consumer is retained in review history. The source-built
hello_notifyexample, native provider startup and explicit Linux ARM64 target provide that reproduction path. They do not settle the maintainers' decision about architecture, dependency policy or in-tree acceptance. Further implementation review belongs in #5021; architecture and contributor coordination can remain here.Tested
Discussion branch integrated with upstream
51acb79ac49eeabf2d0e1d377867f953eb1bcefa. All 466 local compiler/runtime tests and the conventions check passed on Apple M5 Max / macOS 27.2. Full combined consumer/runtime evidence is described on #5021 and must not be attributed to this narrower branch.The source-built example and reproduction commands are in
docs/dev/BUILD.md. EnableANYPS5_RELINKER_ONLY,ANYPS5_NATIVE_AOT,ANYPS5_NATIVE_AOT_EXAMPLEandBUILD_TESTING. The bounded CI variant shortens the example delay; the runtime sleep behavior is unchanged. Full Linux/Windows builds still require maintainer dispatch; new-head hosted results are separate from local results and historical checks.Checklist