mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-30 12:25:49 +00:00
Windows writes an exception frame directly below RSP, so a fault resumed on a guest thread overwrites values a System V leaf function keeps in its red zone. With --frame-red-zone, a leaf function with a push rbp; mov rbp, rsp; push ... prologue that reads or writes below its pushes gets two kinds of trampoline: the prologue lowers RSP by 128 bytes after its pushes, and each pop ...; pop rbp; ret exit raises it back first. Sites a branch enters, sites shorter than a jump and sites over a --to-intel stub are skipped; the conversion reports the framed and skipped counts.