Ask Question
24 October, 15:06

Suppose you want to make a nested function call (i. e. a call to a function from inside of another function) using a jal rather than a call for performance reasons. How would the push and pop pseudo-ops be proprely ordered along with the jal so that the previous return address isn't lost?

a) pop $ra

jal nested_function_label

nop

push $ra

b) push $ra

jal nested_function_label

nop

pop $ra

c) push $ra

pop $ra

jal nested_function_label

nop

d) jal nested_function_label

nop

pop $ra

push $ra

+5
Answers (1)
  1. 24 October, 15:20
    0
    As we need to use a nested loop in our function, hence push $ra

    pop $ra

    jal nested_function_label

    nop is the correct option.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Suppose you want to make a nested function call (i. e. a call to a function from inside of another function) using a jal rather than a call ...” in 📘 Physics if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers