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 are the core components of a computer system? CPU, RAM, ROM, I/O ports, keyboard CPU, RAM, ROM, I/O ports, system bus CPU,
zimovet [89]
CPU, RAM, ROM, system bus, I/O ports
8 0
4 years ago
Read 2 more answers
Complete the paragraph describing characteristics of an audio mixer
Marizza181 [45]

Answer:

XLR inputs and preamps with adjustable trim, EQ, aux buses, pan pots, and faders are the requisite features of every audio mixer, while higher-end large-format consoles may have an additional dynamics section as well.

Explanation:

3 0
4 years ago
Read 2 more answers
What is a file manger ? The file manger is user A . Medium B.platform C. Interface .
zysi [14]

Answer: C. Interface.

Explanation:

File manager is an interface between the hardware part of a computer and the software. the main function of a file manager is to help the user manage all files which they have stored up on their computers. for example the file managers allows the users to view, copy, delete and edit the files which they have stored up on their computer storage devices.

5 0
4 years ago
An example of phishing is: Select one: a. flooding a web server with thousands of requests for service. b. setting up a fake med
tigry1 [53]

Answer:

Option(b) is the correct answer to the given question.

Explanation:

The main objective of the Phishing to posing as a legitimate entity and trick the individuals to sharing her confidential information like information of banking details such as credit card number  and passwords etc.

Phishing is done with the help of email, telephone or etc. Sometime phishing is done by the web page and stolen the website password. Phishing provides financial loss to the individual as well as the organization.

Except for option(b) all the options are not examples of Phishing that's why they are incorrect Options.

7 0
4 years ago
Read 2 more answers
What is the hexadecimal equivalent for 11000101?
Makovka662 [10]

Answer: C5₁₆ ⇔ 11000101₂ ⇔ 197⏨

Explanation: 11000101 is a binary number

it's equivalent decimal number is

1x2⁷+ 1x2⁶+0x2⁵ + 0x2⁴+0x2³+1x2²+0x2¹+1x2⁰ = 128+64+4+1 = 197

Hexadecimal system has equivalents in decimal system

0 ⇔0

1 ⇔ 1

2 ⇔ 2

3 ⇔ 3

4 ⇔ 4

5 ⇔ 5

6 ⇔ 6

7 ⇔ 7

8 ⇔ 8

9 ⇔ 9

10 ⇔A

11 ⇔B

12 ⇔C

13 ⇔D

14 ⇔E

15 ⇔F

197 ⇔??

To convert this decimal number in a hexadecimal number we have to divide it by 16

197/16

12,...

the quotient without the decimal part is multiplied by 16 and subtracted from the number

12x16 = 192

197-192 = 5

Then this number can be expressed as 12x16¹ + 5x16⁰ = 192 + 5 = 197

But in the hexadecimal system there are not digits > 9 , so 12 ⇔ C

197⏨ = Cx16¹ + 5x16⁰ = C5₁₆

Answer: C5₁₆ ⇔ 11000101₂ ⇔ 197⏨

\textit{\textbf{Spymore}}

8 0
3 years ago
Other questions:
  • Can you get banned on this
    10·2 answers
  • Which of the following is a technology designed for use in manufacturing?
    15·1 answer
  • What are the biggest problems facing the criminal justice system in the area of computer crime
    10·2 answers
  • I plugged my headphones into my computer, but the sound still came out of the speakers. help!
    6·2 answers
  • Ashton assigned a string value to a variable. Which program statement should he use?
    7·1 answer
  • KAILANGAN ANG MASIDHI AT MALAWAKANG PAGBABASA NA SIYANG MAKAPAGBUBUKAS NG DAAN SA LAHAT NG KARUNUNGAN AT DISIPLINA TULAD NG AGHA
    7·1 answer
  • What's the answer plssss​
    10·1 answer
  • Logistic Regression is a type of __________ problem.
    13·2 answers
  • If you answer I will mark brainliest!!! I want to be able to see two websites on my screen at the same time, how do I do that on
    9·1 answer
  • What is the size of BIOS?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!