TODO: X86: Separate seldom-updated flags from EFLAGS

2014-04-03 | Dagger Team

Currently, EFLAGS updates caused by common arithmetic instructions have a dependency on the previous value of EFLAGS, because of the need to keep the seldom-updated flags (direction, the reserved bits, ...)

One solution to this problem would be to always have two versions of EFLAGS: Base EFLAGS, which contains the reserved bits, direction flag, and others. Also, the full EFLAGS, which contains all bits. When a common instruction implicitly updates EFLAGS, we can just read the base EFLAGS value, and use it to write a new full EFLAGS. This would remove most partial dependencies and help remove unused EFLAGS update code.