5.101 · exercise
Predict: subroutines
Trace the register states and stack allocations a subroutine call sets up.
0 of 4 correct
Predict the result
// the bl below sits at address 0x400040 bl swap add w0, w0, 1
Predict the result
// C, where sum takes ten int arguments sum(10, 20, 30, 40, 50, 60, 70, 80, 90, 100);
Predict the result
cube:
mul w9, w0, w0
mul w0, w9, w0
retPredict the result
// C, where struct mystruct is 64 bytes of int members struct mystruct lvar; return lvar;