
sum_arr.s
<aside>
đź’ˇ In RISC-V, the return address (the address of the next instruction to execute after a function call) is stored in the ra register.
jal rd, label - Jump & Link
Similar to call label in x64, this instruction will jump to a label and place the return address in ra (or another register, but usually ra). The instruction pointer, pc, will be set to label’s address (start of the function).
jalr rd, imm(rs) - Jump & Link Register (Indirect Jump)
Jumps to address that’s in a register (given by the second operands imm(rs)). This should jump to 0 + the value in the return address register.
</aside>

<aside>
âť— There are NO push/pop instructions in RISC-V! You must modify sp and uselw/sw to make accesses to main memory (access the stack).
</aside>


