QUESTION

Text
Image


B) Translate the following C into RV64I assembly. Be sure to follow the calling convention and comment each line of your assembly. long array_total(long* $a$, long $n$ ) long total $=0 ;$ for (long $i=0 ; i<n ; i++)\{$ $\quad$ total $+=a[i] ;$ return total; long array_total(long* a, long $n$ ) \{ long total $=0$; for (long $i=0 ; i<n ; i++)\{$ total $+=a[i]$; \} return total; \}

Public Answer

RXO9C3 The First Answerer