mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-08 13:00:18 +02:00
Instead of just a trivial pad being on or off, support a tri-state on/off/auto where on will always pad, off will never pad, and auto will pad only if code caching is enabled. Further augment this by allowing a byte-width to be passed in, which can be used with pointers to force a 48-bit VA width to only ever pad to three instructions, reducing the common worst-case situation from 4 instructions to 3. This works because we're not going to expose a VA width larger than 47-bit to the guest. Fixes the handful of use-cases that explicitly chose their NOP padding, and a bug in Arm64Relocations.cpp where it was incorrectly asking to not receive padding even though it requires it.