I have a register a2
that stores an address of another function. How do I call that function?
After I preserved the values of a0 and a1, I tried jal ra, a2
and jal ra, 0(a2)
. Both did not work. I think it is because jal
is expecting a label name instead of a register. But I do not know any other way to call a function.