Question: Assume function arguments are provided in x10 and x11 respectively. 1. Write a RISC-V function called swap that swaps two values in memory. Your

Assume function arguments are provided in x10 and x11 respectively. 1. Write a RISC-V function called swap that swaps two values in memory. Your swap function will take in two memory addresses. The program must be compiled by Venus. See below for an example. void swap (int a, int b) { int temp; temp = a; a = b; b = temp; Memory Addresses 0x1000 0004 Memory Values (Before) 0x11223344 0x1000 0000 0xAABBCCDD Memory Values (After) 0xAABBCCDD 0x11223344 }
Step by Step Solution
There are 3 Steps involved in it
Heres an example implementation of the swap function in RISCV assembly language assembly data tempms... View full answer
Get step-by-step solutions from verified subject matter experts
