Question: Convert the following high - level code into RISC - V assembly language. Assume that the signed integer variables g and h are in registers

Convert the following high-level code into RISC-V assembly language. Assume that the signed integer variables g and h are in registers t0 and t1, respectively. You can use other temporary registers like t2 and t3 if needed.
a) if (g > h)
g =(g -6)*3.5;
else
h =(h +7)/16;
b) if (g <= h)
g =(2.5*h - g)%32;
else
g =(g +3* h)*14;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!