shadPS4
shadPS4 is a PS4 emulator. In my fork I work on the native AArch64 backend and runtime, which translate x86-64 guest code so it runs on Apple Silicon.
From x86-64 guest to AArch64 host
PS4 binaries are x86-64 code. The backend lifts each block into an intermediate representation, then emits AArch64 code for it. Memory accesses and runtime calls must behave as they would on the guest when they cross into the host process.
Memory, flags, and instruction semantics
My latest emitter work covers scalar integer-to-float conversions, shift rules, and memory operations with the x86 LOCK prefix. For ADD, SUB, INC, DEC, AND, OR, and XOR, a locked update has to keep the read, the operation, and the write together even when other threads touch the same memory. If the operand fits in one aligned atomic container it takes the fast path; if it straddles a boundary it goes through a serialized path. In both cases the flags must match what x86 sets for that operation and operand width.
The runtime around translated code
Besides the emitter, I work on guest memory mapping, turning host faults into the right guest behavior, and calls between translated and native code under both ABIs.
Differential testing
ELF test cases run the same guest instructions through the ARM64 JIT and through Unicorn, then compare registers, flags, and memory. The locked-operation cases cover seven operations at 8, 32, and 64 bits, with aligned, unaligned, and boundary-straddling operands. Each fix comes with a test that I confirm fails against the old behavior.