mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-09 11:00:21 +02:00
Six of the EFLAGS can't be used directly in a bitmask because they are either contained in a different flags location or has multiple bits stored in it. SF, ZF, CF, OF are stored in ARM's NZCV format in offset 24. PF calculation is deferred but stored in the regular offset. AF is also deferred in relation to the PF but stored in the regular offset. These /need/ to be reconstructed using the `ReconstructCompactedEFLAGS` function when wanting to read the EFLAGS. When setting these flags they /need/ to be set using `SetFlagsFromCompactedEFLAGS`. If either of these functions are not used when managing EFLAGs then the internal representation will get mangled and the state will be corrupted. Having a little `_RAW` on these to signify that these aren't just regular single bit representations like the other flags in EFLAGS should make us puzzle about this issue before writing more broken code that tries accessing it directly.