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]
2 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]2 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
DLucy is planning to launch her podcast on career guidance for college students and has already recorded a few videos for market
KIM [24]

Answer:

A. FilmoraGo; C. Adobe Premiere

Explanation:

Many video editing software exists out there, but their function is pretty much the same. They edit, mix and customize clips to create beautiful multimedia content for different purposes (advertisements, podcasts, movies, comedy clips, etc.). This software used are different as some may contain more functions and setting than the other.

Let us take a brief dive into the options:

  1. FilmoraGo: is a video editing software that runs on Andriod and iOS. It contains many effects and it is pretty basic to use and understand.
  2. Google Photos: Created by Google, helps to organize your photo albums and stores them for you.
  3. Adobe Premiere: is also a video editing software, it was first launched in 2003 and has since evolved to contain more sophisticated video editing tools.
  4. Audacity: is an audio editor available for Windows, Mac OS, and Linux. This software is completely free and open source.

Hence, dLucy can use the FilmoraGo or the Adobe Premiere to edit her video clips.

6 0
3 years ago
How does outlets generate electricity???
dimaraw [331]

Answer:

"a hole is connected to the wire that brings the electricity back to the breaker box. when you turn on a lamp, the hot part of the outlet allows electricity to flow" I got this info from Google.com

Explanation:

4 0
2 years ago
Understanding photo album dialog box options
FrozenT [24]
Where are the options and the dialog
8 0
3 years ago
The replacement policy that can be implemented in practice and performs the best among the replacement policies that can be actu
scoundrel [369]

Answer:

The answer is "Least recently used policy".

Explanation:

It is the page replacement policy, which uses a less frequent substitute.  It adds a registry from each frame that includes the last time the program, that views within the frame, and use a "logical clock" for each of the data references, that made to change by a tick.

This replacement strategy is often used to substitute its least currently utilized cache line or page, and it is realistic and best implemented among the substitution policies.

6 0
2 years ago
In a single file, you wrote a bike class and used this line of code in the program.
Elza [17]

Answer:

Explanation:

Based on the available options the one that would be correct would be that the code to define your class (beginning with "class bike") must come before the line "bikeA = bike('Acme' 111)." This is because the line of code declaring the object and initializing it needs to be able to grab the information of the class that it is creating an object of. To do this, the class would need to have already been compiled by the program. It is good practice to have each class definitions as its own separate files but this is not a necessity.

5 0
2 years ago
Other questions:
  • Yesterday Hunter's laptop screen appeared to go black. The laptop was still running, but he could not see the desktop or any gra
    9·1 answer
  • A __________ is the column of data in a database that is used as the basis for arranging data.
    8·2 answers
  • In Microsoft word you can access the ______ command from "mini toolbar"
    12·2 answers
  • Which of the following is most likely to be a result of hacking? Group of answer choices slowing of network speed certain Web si
    13·1 answer
  • Before creating a brief to design a product, what is needed
    8·1 answer
  • What is TSM Hamlinz’s discord
    6·2 answers
  • Write a function that takes as input a single integer parameter n and computes the nth Fibonacci Sequence number. The Fibonacci
    8·1 answer
  • Please help! I need to submit this quick!
    6·2 answers
  • Write a Python program (rainfall.py) to collect data and calculate the average rainfall over a period of years. The program shou
    11·1 answer
  • Lynn has created a quarterly sales report using a word processor. The document is confidential, and Lynn wants to secure it with
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!