Question: Procedure calls Given the following C program and the mapping of registers to variables, complete the ARM implementation of Main. Do not implement return 0

Procedure calls
Given the following C program and the mapping of registers to variables, complete the ARM implementation of Main. Do not implement return 0; in main().
int Dif(int a, int b){
return a - b;
}
int Sum(int a, int b){
return a + b;
}
int main(){
int x, y;
w = Sum(x, y);
z = Dif(y, x);
return 0; // Do not implement
}Main:
// Type your code here.
B End
// Procedure Sum (Do not modify)
Sum:
ADD X2, X0, X1
BR X30
// Procedure Dif (Do not modify)
Dif:
SUB X2, X0, X1
BR X30
End:

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 Databases Questions!