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
dimulka [17.4K]
3 years ago
9

Consider the following high-level recursive procedure: long long int flong long int n, long long int k long long int b b k+2; if

(n=-O) b = 8; else b = b + 4 * n + f(n-1 ,k+1); return b + k; Translate the high-level procedure f into ARMv8 assembly language. · Pay particular attention to properly saving and restoring registers across procedure calls; Use the ARMv8 preserved register convention Clearly comment your code; . Assume that the procedure starts at address 0x00400100; . Keep local variable b in X19; Assume n and k are passed in XO and X1 respectively and that the result is returned in X2
Computers and Technology
1 answer:
Stolb23 [73]3 years ago
8 0

Answer:

f(long long, long long):

push rbp

mov rbp, rsp

push rbx

sub rsp, 40

mov QWORD PTR [rbp-40], rdi

mov QWORD PTR [rbp-48], rsi

mov rax, QWORD PTR [rbp-48]

add rax, 2

mov QWORD PTR [rbp-24], rax

cmp QWORD PTR [rbp-40], 0

jne .L2

mov QWORD PTR [rbp-24], 8

jmp .L3

.L2:

mov rax, QWORD PTR [rbp-40]

lea rdx, [0+rax*4]

mov rax, QWORD PTR [rbp-24]

lea rbx, [rdx+rax]

mov rax, QWORD PTR [rbp-48]

lea rdx, [rax+1]

mov rax, QWORD PTR [rbp-40]

sub rax, 1

mov rsi, rdx

mov rdi, rax

call f(long long, long long)

add rax, rbx

mov QWORD PTR [rbp-24], rax

.L3:

mov rdx, QWORD PTR [rbp-24]

mov rax, QWORD PTR [rbp-48]

add rax, rdx

add rsp, 40

pop rbx

pop rbp

ret

Explanation:

You might be interested in
What happens when you press Ctrl Alt Delete twice?
Iteru [2.4K]
The same thing as if you do it once
6 0
3 years ago
Which two men developed the steam engine?
Whitepunk [10]

Answer:

Thomas Savery and Edward Somerset.

Explanation:

6 0
3 years ago
Whenever I try to take a picture of a question on brainly it says “oops something went wrong try again in a while”. Is anybody h
yuradex [85]

Answer:

yes I am having the same problem I take a picture and it says something is wrong with connection

8 0
3 years ago
Read 2 more answers
Ken Olson, president of Digital Equipment Corp. in the late 1970's, Thomas J. Watson, chairman of IBM in the early 1940's, and T
tensa zangetsu [6.8K]

Answer:

All of the above is the correct answer to the given question .

Explanation:

As the Ken olson is the Ken Olson, president of the Digital Equipment Organization . Following are the predictions of  Ken olson of the the technology that are wrong.

  • Lack of creativity regarding the current applications that the user has would consider for the  technology.
  • Lack of creativity regarding the  user or the client has liking.
  • Lack of creativity on what the government would be charging ford. Any of these

So we will choose the Option all these.

8 0
3 years ago
A restaurant buys a pizza oven that is 4.5 feet long, 5 feet wide and 6 feet tall. What is the volume of the pizza oven?
torisob [31]

Answer:

135 as 4.5 times 5 times 6 gives you the volume and it =135

4 0
3 years ago
Other questions:
  • In a two-sided tag, a(n) ____ tag indicates the content's end.
    7·2 answers
  • The Modified Greiss chemical test is used to detect the presence of what chemicals that indicate muzzle to target distance?
    11·1 answer
  • What happens when a magnet is close to a iron nail?
    12·1 answer
  • By using the search functionality within a twitter stream, users can filter for:
    9·1 answer
  • How come I haven't moved to the next rank even though I have all of the right things to move on?
    10·2 answers
  • How many report charts can be added to the account page layout to meet this requirement? A sales manager would like to look at a
    14·1 answer
  • The picture that graphically represents the items you use in Windows is called a/an <br> ___?
    14·1 answer
  • All computer systems have
    14·2 answers
  • ¿Qué significa PPO a nivel de programación?
    15·1 answer
  • What is the name of the User-defined function that is mentioned in the code?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!