3 ms·
I’m way out of my depth here, but as far as I know flags have a non-trivial interaction with superscalar execution. Not sure how accurate it is, but I can imag
by kaba0 5y ago
I’m way out of my depth here, but as far as I know flags have a non-trivial interaction with superscalar execution.
Not sure how accurate it is, but I can imagine it being similar to parallelizing a program with independent units of works vs trying to do the same for threads that depend on each other’s output.
- titzer 5y agoFlags are treated as just another kind of dependency in the register renaming phase, though it's a lot hairier because they probably need to be tracked on an individual (per-bit) basis. As a sibling commenter noted, a conditional call is basically just a macro for a (negated) conditional branch jump over a call instruction, but with a different prediction.