Question: the C function p 9 is compiled to the x 8 6 code shown on the right. complete the C function p 9 on the
the C function p is compiled to the x code shown on the right. complete the C function p on the left using a while loop, so that it does the same thing as the compiled x code. long plong val # val in rdi p: pushq rbp movq rsprbp movq rdi, rbp movq $rbp movl $rbp jmp LL: movl rbpeax cltq leaq rax,rdx movq rbprax addq rdxrax movq raxrax testq rax, rax jne L subl $rbp jmp LL movq $rbp jmp LL: cmpl $rbp jg LL: movq rbprax popq rbp ret
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
