Question: [ sp , #B ] / / place the return address # 0 ] / / place the frame pointer on the stack 2 /

[ sp, #B ]//place the return address
#0]//place the frame pointer on the stack
2//put arg3 in the appropriate regi
procedureB
procedureB //call procedureB
load x9(var1) with the value returned by proced
Question 3
Fill in the blarks as appropriate with a register (e.g.0 or 0) or a mnemonic ic.a.
b) or a number (e.g #2)
long long int procedureAliong long int arg1, long long int arg2, long long int arg3)
I long long int vart:
vart = precedureB(arg3);
var1- var 1+arg1+arg2+arg3;
return var1;
J
We will convert this code to ARM. Assume var 1 is in 9.
W/irst we will prepare a stack frame for procedureA before the call to procedureB
#place arg1, arg2, arg3, return address, frame pointer on stack
sub sp, sp.
/ make room on the stack, how many bytes?
stur
[ sp.432]/place arg 1 on the stack, what register?
stur
I sp,%24]/place arg2 on the stack, what register?
stur
| sp, #16| ipplace arg3 on the stack, what register?
stur
[ sp, #B ]//place the return address on the stack, wha
registerh, #0]//place the frame pointer on the stack
mov
Received 9 out of 15, I'd like to know the correct answers.
[ sp , #B ] / / place the return address # 0 ] /

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!