mulli for constant multiplies
Multiplying by a constant has its own instruction: the immediate multiply mulli rD, rA, imm, with the multiplier inside the instruction itself — no separate load.
For example, times6(n) = n * 6 compiles to:
mulli r3, r3, 6
blr
The immediate field is the constant — read it out of the instruction.
(One kind of constant skips mulli: a power of two, which the compiler turns into a cheaper shift instead. That's a story for a later chapter.)
Look at the immediate on the mulli in the target assembly: that value is your multiplier.
Your task
Write mulConst to reproduce the target assembly.