subject
Computers and Technology, 23.04.2021 16:00 jhony70

Below there is one function written in C. int fn(unsigned int a, unsigned int b){
if (b == 0)
return b;
else
return (a* fn(a, b - 1));
Below I have changed the high-level C code to output ab and I am providing the assembly code with blank instructions. Assume that a and bare stored in x11 and x12 respectively. Result must be returned in register x11. Also, we assume that the number ab will always fit in a 64-bit register correctly.
You must fill in the blanks. I may have unnecessary blanks in the code, on purpose. Every time you encounter such a blank you will write NO Also, if you need to use registers from one category: saved, temp, arg, you must always start from the lowest indexed register, and increase the index by 1 if you need an additional register. You must store the MINIMUM number of data in the stack. Otherwise you loose points. You may have to use some of the blanks to write 2 or more consecutive instructions TO ONE BLANK ONLY if needed (e. g., for the stack, or for the result).
Example: for the stack you may need to write complete instruction: eg, sd x8, 17(x9) (fictitious regs, nums) for a branch I may give you the instruction opcode and you may only need to complete with the remaining syntax: e. g, x4, Label1 (fictitious register and label) fn: addi sp, sp, - beg Exit addi /Recurse at this point Id x1, Osp) //What else do we need from the stack? Id Id addi mul Exit:

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:30
I'll mark brainliest if answered right! with which feature or menu option of a word processing program can you make an image like this? you can get this image using the option of a word processing program.
Answers: 1
question
Computers and Technology, 24.06.2019 05:50
What all vehicles has tesla inc. created over the years
Answers: 3
question
Computers and Technology, 24.06.2019 17:40
The value of sin(x) (in radians) can be approximated by the alternating infinite series create a function (prob3_2) that takes inputs of a scalar angle measure (in radians) and the number of approximation terms, n, and estimates sin(x). do not use the sin function in your solution. you may use the factorial function. though this can be done without a loop (more efficiently), your program must use (at least) one. you may find the mod() function useful in solving the problem.
Answers: 1
question
Computers and Technology, 24.06.2019 21:40
is on drugs i swear i ask a question and its not showing whats going
Answers: 2
You know the right answer?
Below there is one function written in C. int fn(unsigned int a, unsigned int b){
if (b ==...
Questions
question
Mathematics, 12.12.2020 16:10
question
Health, 12.12.2020 16:10
question
Mathematics, 12.12.2020 16:10
question
Mathematics, 12.12.2020 16:10