Exercise · Volume 1 · 1.3.1-10
Exercise 1.3.1-10
not stated yet in Lean solution written
| Rating | 15 |
|---|---|
| Kind | K3, find a value: compute a number, a set or a closed form from the written solution |
| Section | Section 1.3.1 of Volume 1. Companion chapter: Description of MIX |
The task
List the operators that can change the comparison indicator.
The exact wording is in your copy of the book.
Hints
Open one hint at a time. Try the exercise again after each.
Hint 1
Only one family compares a register with memory.
Solution
Show the solution
The comparison indicator is set by the comparison operators CMPA, CMP1, CMP2, CMP3, CMP4, CMP5, CMP6 and CMPX. The floating compare FCMP is the variant of CMPA with the field , so it uses the same code. No other operator writes the indicator. The conditional jumps JL, JE, JG, JGE, JNE, JLE only read it.
Check
python3: operation codes to are eight consecutive codes: [56 + i for i in range(8)]. This matches the eight names above.
Remarks
Exercise 1.3.1-14 explains why a comparison is never a no-op.
This solution is drafted, and a person has not reviewed it yet. The source.
In Lean
not stated yet The exercise is not stated in Lean yet.
The status is computed from the Lean build. The node of the map.
Something is wrong? Report it.