Question: Problem 5: The RISC-V ISA does not have a circular shift instruction to circularly shift the contents of a register by a certain amount. Assume

Problem 5: The RISC-V ISA does not have a circular shift instruction to circularly shift the contents of a register by a certain amount. Assume we introduce a new pseudo-instruction called slc, which is similar to sll but does circular shifting to the left. For example, if X2 = Ob1011_0001_1110_1010_1000_1100_1110_0000 = 0xB1EA_8CEO and x2 5, then then slc x1, x2, x3 circularly shifts x2 by 5 positions to the left to produce x1 = ob0011_1101_0101_0001_1001_1100_0001_0110 = 0x3D51_9016 a) Write a sequence of RISC-V instructions to implement slc x1,x2,x3 using shift instructions that we have seen in the lectures. b) Show how to use slc to implement src, the right circular shift version of slc
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
