Question
Problem 4 (20 points) Implement the following C code in MIPS assembly as given; in other words, you must implement the recursive calls. int my_fib(int
Problem 4 (20 points) Implement the following C code in MIPS assembly as given; in other words, you must implement the recursive calls. int my_fib(int n){ if (n==0) return -1; else if (n==1) return -2; else return my_fib(n-1)+my_fib(n-2); } You need to name your program as my_fib.s and test your program for n=1, 2, 3, 5, 7, and 10 respectively using test_my_fib.s (http://www.cs.fsu.edu/~liux/courses/cda3100/assignments/test_my_fib.s) and include the results (shown on the console) in the pdf file to be submitted. Additionally, what is the total number of MIPS instructions to be executed by your function for n=10? Give a brief explanation.
Note: This is not a standard Fibonacci sequence
if prompted when following link:
username: cda3100
password: cda3100-fsu
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started