Question: Assume you have a processor which has general purpose registers X0-X31, and X0 is allocated to be 0 at all times (it cannot be changed).
Assume you have a processor which has general purpose registers X0-X31, and X0 is allocated to be 0 at all times (it cannot be changed). Assume A is stored in X10 and Sum is stored in X20, all others are free to use. You have access to all the RISC-V32I Instructions (the ones provided in the book) and you can use immediate functions (such as ADDI). Create the assembly level code for the following operation: Sum = (A>>2) (A>>13) (A>>22) (Hint: This is going to definitely take more than one line of code and there is no penalty to having too many lines of code. Dont waste time optimizing)
THEN, convert your created program into Machine Code.
THANK YOU will thumbs up for good answers
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
