Question: convert this code into Risc V Assembly int sumTwo(int A[], int B[], int size){ int tempA = 0; int tempB = 0; int tempSura =
convert this code into Risc V Assembly
int sumTwo(int A[], int B[], int size){ int tempA = 0; int tempB = 0; int tempSura = 0; if (size == 0){ return 0; > else{ if(A[size-1]>0){tempA = A[size-1];} else{tempA =0;} if(B[size-1]>0) {tempB = B[size-1];> eise {tempB = 0;} tempSura = tempA + tempB; return sumTwo (A, B, size-l) tempSum; } > int main(){ int A[10] = {1,2,-3,4,12,323,-1,132,95,66}; int B[10] = {0,1,0*2,0,3,4,5,6,7}; int result = sumTwo(A,B,10); printf( "Xd " , result); return 0; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
