1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
GalinKa [24]
3 years ago
10

Translate function f into RISC-V assembly language. Assume the function declaration for g is int g(int a, int b). e code for fun

ction f is as follows: int f(int a, int b, int c, int d){ return g(g(a,b), c d); }
Computers and Technology
1 answer:
Shkiper50 [21]3 years ago
4 0

Answer:

int f(int a, int b, int c) {

return func(func(a, b), c);

}

f: addiu $sp, $sp, -8 # allocate frame = 8 bytes

sw $ra, 0($sp) # save return address

sw $a2, 4($sp) # save c

jal func # call func(a,b)

move $a0, $v0 # $a0 = result of func(a,b)

lw $a1, 4($sp) # $a1 = c

jal func # call func(func(a,b),c)

lw $ra, 0($sp) # restore return address

addiu $sp, $sp, 8 # free stack frame

jr $ra # return to caller

You might be interested in
Whose work is responsible for the invention of the air bag? Scientist, Engineers or both?
jenyasd209 [6]

The scientist and the engineers were both responsible for the invention of the airbag.

  • Peter Florhancicn was a scientist and he invented the airbag because of the Dutch people who drowned when they drove into the canals

  • Also, John Hetrick who was an engineer filed for the patent of airbags when he saw that deers were running across the road. He believed that it could cause an accidentthat led to the invention.

In conclusion, both the engineers and the scientists were responsible.

Read related link on:

brainly.com/question/24686827

3 0
3 years ago
Dashed lines that display on your slide when you are moving an object and that assist you with alignment are referred to as:
Umnica [9.8K]
Smart guides is the answer.
7 0
3 years ago
Read 2 more answers
All air transportation carriers transport freight to some extent. True False
SCORPION-xisa [38]
TRUE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
4 0
4 years ago
Read 2 more answers
With more and more users using mobile to look at websites, it is key that you optimise your site so users can find it when searc
inessss [21]

Answer:

Site speed and usability.

Explanation:

Web pages are developed using web development tools like HTML, CSS, JavaScript etc. A collection of these web pages are called a website. The web is a hosted for internet use in a web server.

All requests for a website in a web server is done in a web browser in a client device. For a website to be easy searched for , the search engine optimisation technique is used.

A hosted website on a server must have a unique and usable domain name and the page loading on a browser should be made faster by optimising the size of the scripting language.

3 0
3 years ago
Time-management techniques work most effectively when performed in which order?
Sholpan [36]

Answer:

study-time survey, project schedule, prioritize tasks, reward system.

Explanation:

Time management can be defined as a strategic process which typically involves organizing, planning and controlling the time spent on an activity, so as to effectively and efficiently enhance productivity. Thus, when time is properly managed, it avails us the opportunity to work smartly rather than tediously (hardly) and as such making it possible to achieve quite a lot within a short timeframe. Also, a good time management helps us to deal with work-related pressures and tight schedules through the process of properly allocating the right time to the right activity.

Hence, time-management techniques work most effectively when performed in the following sequential order; study-time survey, project schedule, prioritize tasks, and designing (creating) a reward system.

4 0
3 years ago
Other questions:
  • Which one of the following items is an example of software?
    15·1 answer
  • Which HTML tag is used to add a paragraph to a web page?
    15·1 answer
  • Given an integer n and an array a of length n, your task is to apply the following mutation to an: Array a mutates into a new ar
    5·1 answer
  • Super computer in nuclear energy ​
    13·1 answer
  • One easy way to tell if a cell contains a formula instead of data is to click on the cell and look at the formula bar to
    5·2 answers
  • Random.choice will choose a number between 1 and 100. True False​
    6·1 answer
  • Question #3
    15·2 answers
  • LIST THE SKILLSET NEEDED FOR BECOMING A PROGRAMMER.
    14·1 answer
  • Discuss the ways you can perform to prevent your computer/device and its data/contents from being stolen. Define two-facto authe
    7·1 answer
  • How bridges are built over water
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!