Question: Language is in assembly(ARM) Need debugging help float zeroQuidFP2float(unsigned int quidNum) : This routine should be called within quidFP2float when quidNum encodes a +0 or
Language is in assembly(ARM) Need debugging help
float zeroQuidFP2float(unsigned int quidNum) : This routine should be called within quidFP2float when quidNum encodes a +0 or a -0 to return the appropriate IEEE float. * Keep in mind that the R0 register will store the quidNum argument when a routine
My code:
.global zeroQuidFP2float
zeroQuidFP2float: // zeroQuidFP2float's prolog (do not edit) push {r4-r10, fp, lr} // using SP to save preserved regs that might be modified add fp, sp, #FP_OFFSET // using SP to update FP to the new stackframe
//=================== YOUR CODE GOES IN THE SECTION BELOW ===================//
lsl r0,r0,#24 //apparently this is wrong
//===========================================================================//
// zeroQuidFP2float's epilog (do not edit) sub sp, fp, #FP_OFFSET // using FP to restore SP to the old stackframe pop {r4-r10, fp, lr} // using SP to restore regs saved in prolog bx lr // using LR to update PC and thereby return ~ ~ ~ ~ ~ -- VISUAL -- 16 51,0-1 Bot
is called, and that the return value should be placed in R0 as well.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
