The following is the resulting machine code when compiled on an ×86−64 machine with GCC, omitting tw instructions. For e
Posted: Thu Jul 14, 2022 2:19 pm
The following is the resulting machine code when compiled on an ×86−64 machine with GCC, omitting tw instructions. For each register, give the value it holds during the iteration, expressed in terms of the C program: a. \%rcx = p, \%rdx =q,%rax=i,%edi=p+q,%dil=( char )(p+q) b. \%rcx = q, % rdx =p,%rax=p+q,% edi =i,% dil = (char)i c. \%rcx = p, %rdx=q,%rax=p+q,% edi =i,% dil = (char)i d. \%rcx =q,%rdx=p,%rax=i,%edi=p+q,%dil=( char )(p+q) The missing two instructions are: a. (a) movq \%rax, \%rcx (b) cmovne \%rcx, \%rax b. (a) cmovne \%rcx, \%rax (b) movq \%rcx, \%rax c. (a) movq \%rax, \%rcx (b) movq \%rcx, \%rax d. (a) cmovne \%rax, \%rcx (b) cmovne \%rcx, \%rax e. (a) cmovne \%rax, \%rcx (b) movq \%rcx, \%rax