0

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.

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
daloca7144
  • 11
  • 1

0 Answers0