pub enum Reads {
Zero,
Signed,
Unsigned,
Carry,
}Expand description
Which part of what a comparison against zero left a condition is about.
Variants§
Zero
Whether the value was zero, and nothing else.
Signed
Where the value sits against zero as a signed number, which is the sign and the overflow.
Unsigned
Where it sits as an unsigned number, which is the carry, alone or with the zero.
Carry
The carry as the instruction in front left it, which no comparison is a substitute for.
The other three are parts of the answer to a question, so an instruction that has already
asked that question can stand in for the one that would have asked it again. An add with
carry is not reading an answer. It is reading the bit that fell off the end of the addition
in front of it, and the only thing that leaves that bit is that addition, so nothing this
pass could put there instead is the same. Zeroing::covers says no to it for every entry
there is and will go on saying no to every entry added later, which is what keeps a
comparison in front of one of these where the program put it.