Question: 1 you will develop riscv assembly language implementations of You will develop RISC - V assembly language implementations of the following problem and print the
you will develop riscv assembly language implementations of
You will develop RISCV assembly language implementations of the following problem and print the results to ensure that both the C implementation and your RISCV implementation compute the correct answer.
Your executables must be named as follows, and must be compiled with a Makefile
We will test your projects using autograder
Note that in all your programs below you must follow the RISCV function calling conventions that we cover in class.
Your solutions must follow the logic and implement the same functions as given in the C code.
Remeber to remove the line # YOUR CODE HERE from the starter code.
findmaxll Find the maximum value in a linked list.
$ findmaxll
C:
Asm:
C code we need to follow
#include
#include "linkedlist.h
int findmaxllcstruct nodest np
int v;
int max;
max npvalue;
np npnextp;
while np NULL
v npvalue;
if v max
max v;
np npnextp;
return max;
findmaxllp Find the maximum value in a linked list and print the list elements using printf while traversing the list.
$ findmaxllp
v
v
v
v
v
v
v
v
v
v
C:
v
v
v
v
v
v
v
v
v
v
Asm:
C code we need to follow
#include
#include
#include "linkedlist.h
int findmaxllpcstruct nodest np
int v;
int max;
max npvalue;
printfv d
max;
np npnextp;
while np NULL
v npvalue;
printfv d
v;
if v max
max v;
np npnextp;
return max;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
