Hi, I have been trying to do the following exercise but I cannot get my code to
ID: 3795673 • Letter: H
Question
Hi,
I have been trying to do the following exercise but I cannot get my code to compile. i would really appreciate some help. Thank you!
Write an equivalent MIPS32 assembly subroutine for the function to calculate x raised to the power y, int power (int x, unsigned int y), where the pseudocode procedure is listed below. Note that all variables in the pseudocode procedure must be represented by data segment variables in the MIPS32 assembly fragment. This fragment is working with 32-bit integers. Follow register conventions established in class. Input: int x, unsigned int y (these must be passed in through registers) f y 2. Return 1 3. Else if y 2 4. Return (power (x, y/2) power (x, y/2)) 5. Else 6. Return (x power (x, y/2) power (x, y/2))