Problem 1: Translate the following RISC-V function F1 into machine code both in binary and hexadecimal: addi x9, х0, -5 add x10, х0, х9 sw x10, 20 (x0) lw x11, 20 (x0) beq x9, х11, L1 jal x0, L2 lui...


Problem 1:<br>Translate the following RISC-V function F1 into machine code both in binary and hexadecimal:<br>addi x9, х0, -5<br>add x10, х0, х9<br>sw x10, 20 (x0)<br>lw x11, 20 (x0)<br>beq x9, х11, L1<br>jal x0, L2<br>lui x8, 65<br>auipc x9, 321<br>jalr x9, 80 (х1)<br>F1:<br>L2:<br>L1:<br>If a caller uses the instruction:<br>jal x1, F1<br>residing at address 9200 to call the F1 function residing at address 2800, what would be the final values of x0, x1,<br>x8, x9, x10, and x11 at return time? What will be the values of the PC and of x9 immediately after the execution of<br>the auipc instruction?<br>Hint: Please lookup the Unprivileged ISA Specifications of the RISC-V processor (on https://riscv.org) to understand<br>the auipc instruction.<br>

Extracted text: Problem 1: Translate the following RISC-V function F1 into machine code both in binary and hexadecimal: addi x9, х0, -5 add x10, х0, х9 sw x10, 20 (x0) lw x11, 20 (x0) beq x9, х11, L1 jal x0, L2 lui x8, 65 auipc x9, 321 jalr x9, 80 (х1) F1: L2: L1: If a caller uses the instruction: jal x1, F1 residing at address 9200 to call the F1 function residing at address 2800, what would be the final values of x0, x1, x8, x9, x10, and x11 at return time? What will be the values of the PC and of x9 immediately after the execution of the auipc instruction? Hint: Please lookup the Unprivileged ISA Specifications of the RISC-V processor (on https://riscv.org) to understand the auipc instruction.

Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here