Question: Write the C code equivalent of following RISC-V instructions. Assume that the variables f, g, h, i, and j are assigned to registers x5,
Write the C code equivalent of following RISC-V instructions. Assume that the variables f, g, h, i, and j are assigned to registers x5, x6, x7,x28, and x29, respectively. Assume that the base address of the arrays A and B are in registers x10 and x11, respective Assume that the elements of the arrays A and B are 8-byte words. slli ld slli ld add sd x28, x28, 3 x28, 0(x10) x29, x29, 3 x29, 0(x11) x29, x28, x29 x29, 64 (x11) O a. B[64] A[i] + B[j]; O b. None of the given O c. B[8] A[0] + B[0]; O d. B[8] A[0] + A[0]; O e. B[8] = A[i] + B[j]; Of. B[8] A[i] + A[j];
Step by Step Solution
3.44 Rating (154 Votes )
There are 3 Steps involved in it
The detailed answer for the above question is provided below It looks like youve provided an image w... View full answer
Get step-by-step solutions from verified subject matter experts
