Question: a) Consider the RISC-V code below. Indicate what is the value in register x20 after the code below is executed, and explain why; ori x18

a) Consider the RISC-V code below. Indicate what is the value in register x20 after the code below is executed, and explain why; ori x18 x0 16 addi x20 x18 0 beq x20, x18, HERE add x20 x20, x20 b) Assume that the code above is part of a procedure called by main. What happens with the stack pointer during the procedure execution and why? Draw and explain. c) Add instructions to the above code to implement your answer in question b)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
