Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Translate the following RISC-V function F1 into machine code both in binary and hexadecimal: F1: addi x9, x0, -5 L2: add x10, x0, x9
Translate the following RISC-V function F1 into machine code both in binary and hexadecimal: F1: addi x9, x0, -5 L2: add x10, x0, x9 sw x10, 20 (x0) L1: lw x11, 20 (x0) beq x9, x11, L1 jal x0, L2 lui x8, 65 auipc x9, 321 jalr x9, 80 (x1) 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?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
To translate the RISCV function F1 into machine code well assume a 32bit RISCV instruction set archi...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started