Question: The do _ add function takes as argument two integers in registers and does the following: 1 . Add the two integers without using the
The doadd function takes as argument two integers in registers and does the following:
Add the two integers without using the 'add or 'sub RISCV instruction. This
restriction applies to any functions that doadd calls. You may use addi to adjust
the stack pointer if necessary for making function calls. You will likely need to
use the or 'and', 'xor', sll and srl instructions.
Return the result in a register. If there is an arithmetic overflow, return an error
condition identifying that an overflow occurred in another register.
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
