Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

5. (25 Points) Consider the code segment for (i-0: -100; it+) Assume X is an arr

ID: 3750495 • Letter: 5

Question

5. (25 Points) Consider the code segment for (i-0: -100; it+) Assume X is an array of 64-bit integer, d is a 64-bit integer, and i is a 32-bit integer. Assume XO] is at address O(RO) in memory, X[1] at RO+8, X[2] at RO+ 16, etc. Assume d and i are at addresses d and j in memory. 1. (15 Points) Write the code in RISC-V; include comments on each line. 2. (5 Points) What is the size of the RISC-V code in bytes? 3. (5 Points) What is the RISC-V code CPl? Assume Load and store instructions take 4 cycles each, branches take 3 cycles, and arithmetic/logical instruction each takes one cycle.

Explanation / Answer

ANS:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote