Question: Below is the C code for a function f , but with the if test expression replaced by the comment / * TEST * /
Below is the C code for a function f but with the if test expression replaced by the comment TEST The assembly that was generated by compiling the original function f appears below the C code. What was the test expression in the original C code?
long flong x long y
if TEST
return x ;
else
return x ;
f:
movq rdi, rdx
salq $rdx
movq rdi, rax
orq $rax
cmpq rsi, rdi
cmovg rdxrax
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
