The value of X that would result in the correct execution of
The value of X that would result in the correct execution of doubleIt is: _____________ ?
Suppose doubleIt (in question above) was a function implemented by the cmath library. Which choice lists ALL the registers that can be used to replace %ecx in the assembly code of doubleIt without affecting its logic?
| %eax and %edx |
Solution
The value of X that would result in the correct execution of doubleIt is 2 so that we can divide the 2 into 2 parts into bits and then we can perform all the functions of the code.The one half will be popped out and answer will be 1.
we can use %ebx and %edx instead of %ecx between it finds the value between ebx and edx which is the value of ecx.This is why we can replace it with this.
