mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 00:00:41 +02:00
This usually happens on backwards memcpy where we know the direction of the copy because the code will typically do as follows: ``` std rep movsb cld ``` This is because the direction flag is part of the ABI and needs to be set back to the forward direction if it was modified. This typically doesn't get picked up on forward copies because we won't have visibility of a cld instruction in the block. This optimization allows us to only emit half of the code for the memcpy if it is a compile time constant. There's definitely some future task that could assume forward direction if unknown and recompile the code if the assumption has failed, but not doing that here.