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 03:10
This program reads a file called 'test.txt'. you are required to write two functions that build a wordlist out of all of the words found in the file and print all of the unique words found in the file. remove punctuations using 'string.punctuation' and 'strip()' before adding words to the wordlist. write a function build_wordlist() that takes a 'file pointer' as an argument and reads the contents, builds the wordlist after removing punctuations, and then returns the wordlist. another function find_unique() will take this wordlist as a parameter and return another wordlist comprising of all unique words found in the wordlist. example: contents of 'test.txt': test file another line in the test file output: ['another', 'file', 'in', 'line', 'test', 'the']
Answers: 1
question
Computers and Technology, 23.06.2019 04:00
Another name for addicting games.com
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. which step can possibly increase the severity of an incident? a. separating sensitive data from non-sensitive data b. immediately spreading the news about the incident response plan c. installing new hard disks d. increasing access controls
Answers: 2
question
Computers and Technology, 23.06.2019 19:00
This question involves a class named textfile that represents a text file. public class textfile { private string filename; private string filename; private arraylist words; // constructors not shown // postcondition: returns the number of bytes in this file public int filesize() { } // precondition: 0 < = index < words.size() // postcondition: removes numwords words from the words arraylist beginning at // index. public void deletewords(int index, int numwords) { } // precondition: 0 < = index < = words.size() // postcondition: adds elements from newwords array to words arraylist beginning // at index. pub lic voidaddwords(int index, string[] newwords) { } // other methods not shown } complete the filesize() method. the filesize() is computed in bytes. in a text file, each character in each word counts as one byte. in addition, there is a space in between each word in the words arraylist, and each of those spaces also counts as one byte. for example, suppose the words arraylist stores the following words: { mary had a little lamb; its fleece was white as snow. } the filesize() method would compute 4 + 3 + 1 + 6 + 5 + 4 + 6 + 3 + 5 + 2 + 5 as the sum of the lengths of each string in the arraylist. the value returned would be this sum plus 10, because there would also be 10 spaces in between the 11 words. complete the filesize() method below: // postcondition: returns the number of bytes in this file public int filesize() { }
Answers: 1
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, 18.03.2021 03:40
question
English, 18.03.2021 03:40
question
Mathematics, 18.03.2021 03:40
question
Biology, 18.03.2021 03:40
question
Biology, 18.03.2021 03:40
Questions on the website: 13722363