Yes — it needs to use some
S registers
so should save the ones it uses in the prolog.
maxExp needs to compute three values:
x*x,
x*y, and
5*y,
and needs to use S registers to hold them in.
Could this subroutine avoid the need to save S registers
by using T registers instead?