Skip to content

test(aot): run optimized controller and independent component consumers - #4424

Closed
yabanana wants to merge 163 commits into
boykopovar:mainfrom
yabanana:feature/aot-optimized-consumers
Closed

yabanana wants to merge 163 commits into
boykopovar:mainfrom
yabanana:feature/aot-optimized-consumers

Conversation

@yabanana

@yabanana yabanana commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What

Run the unchanged public pad_input source at O2 and test transfer to independent public components. The O2 controller profile consumes the recovered main ABI and fixed stack facts; scoped debug values remain obligations. Guard sites are derived from the existing source-qualified policies, not copied instruction by instruction.

Extend the provider catalog with reviewed LP64 memset/memcpy/strlen bindings. The unchanged SHA-256 module from blackbearreloaded/ps5-native-app-boilerplate is built at O0/O2 and checked against known vectors, Python hashlib and an independently compiled native reference. A musl memcmp holdout, selected after the compiler changes, reuses the pipeline at O0/O2 without another compiler rule. Both component inputs are caller-supplied and hash-pinned; no external code or binaries are vendored. This tests components, not their original application loaders.

Incremental review: yabanana/AnyPS5@feature/aot-finite-dispatch...feature/aot-optimized-consumers

Tested

Latest integration checkpoint (12 October): aligned with main 2f4cc8983, including the new component technical-debt layout. The final combined stack with the separate C++ follow-up #4718 passed 588 compiler/relinker/runtime checks and 26 native integrations on Apple Silicon. Rebuilt cube AOT/reference still match all eight RGB frames after 600 flips each; controller and typed module-bundle acceptance pass. These are local results; hosted CI is running on the updated head. Full Linux/Windows builds still require maintainer dispatch.

Integration checkpoint, 12 October: merged main fe66af13e through the dependency stack and requalified affected provider identities after reviewing their implementations. The final combined stack passed 526 compiler/relinker/runtime cases, 26 native integration cases, the rebuilt graphics pair (600 flips each, teardown, eight exact RGB frames), controller O2 and SHA/memcmp O0/O2 checks on Apple Silicon. Hosted checks refer to the new head and remain separate from these local results. Full Linux/Windows builds require maintainer dispatch.

Verified on Apple ARM64 from the final stack:

  • 497 compiler/relinker tests (496 in the restricted environment plus the native hello with macOS sysctl access); 24 native tests.
  • pad_input O2: all six AOT/reference scenarios agree on output, errors and lifecycle; production smoke retains 625 actual sleeps and teardown. Physical controller input remains unqualified.
  • SHA-256: 64 message/chunk cases per O0/O2 profile and per implementation, including block boundaries, guard bytes, hexadecimal output and invalid comparisons.
  • memcmp: 108 buffer/length/alignment cases per profile plus aliases and protected-page boundary checks, against a bytewise oracle and native reference. No compiler changes were needed for this holdout.
  • Graphics: 600 completed flips per implementation, teardown and eight 1920x1080 captures with exact RGB equality.
  • Conventions, diff and test registration checks pass. Hosted CI is pending; full Linux/Windows builds still require maintainer dispatch.

Reproduction is in docs/dev/BUILD.md. Set ANYPS5_PAD_OPTIMIZATION=O2 for the graphics build and run native_pad_input_check. Optional ANYPS5_AOT_SHA256_SOURCE_ROOT and ANYPS5_AOT_MEMCMP_SOURCE register both component profiles with CTest. The minimal AOT CI lane compiles pad_input O0 and O2. Receipts bind input, sources, contracts, objects, linked libraries, runtime, compiler and linker.

The symbol-free ELF is also analyzed without a companion: function ABI recovery remains unresolved. Source ABI, C object bounds/lifetimes and binding qualification are still preconditions. Timings cover automated build/acceptance, not human qualification effort. This does not establish game compatibility or a performance advantage over Rosetta.

Clang 17 CI exposed a partial-register copy in the optimized controller loop. The follow-up propagates defined-bit masks through GPR MOV and scalar LEA; observable undefined-bit uses still reject. Three reduced regressions cover the loop, high-byte transport and invalid wide uses. All three hosted AOT lanes, including macOS with Clang 17, pass on 19b73d6.

Checklist

Rebase the graphics proposal onto upstream b42ef24 without carrying the historical macOS merge chain. Includes the compiler/runtime prerequisite from PR boykopovar#1835 and the still-required macOS foundation from mugurc/macos-port at 21930ce; those platform changes remain until their upstream PRs land. Preserve upstream starting-quad folding and the qualified vertex lane rule. Keep x87-dependent Math.cpp outside the optional ARM64 graphics closure rather than weakening its ABI assertion.
This was referenced Oct 15, 2026
@ArjenS-LA ArjenS-LA mentioned this pull request Oct 15, 2026
11 tasks done
@yabanana

Copy link
Copy Markdown
Contributor Author

Superseded by #5021, which now contains the consolidated native ARM64 AOT implementation and verified consumers. #1835 remains the architecture discussion. Closing this stacked PR to keep one implementation review; its branch and review history are retained. This is not a merge into main.

@yabanana yabanana closed this Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build ci .github docs libc libkernel needs rebase Conflicts with main, rebase needed prx relinker shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant