Page 1 of 1

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
by answerhappygod
The Following Is The Resulting Machine Code When Compiled On An 86 64 Machine With Gcc Omitting Tw Instructions For E 1
The Following Is The Resulting Machine Code When Compiled On An 86 64 Machine With Gcc Omitting Tw Instructions For E 1 (91.28 KiB) Viewed 32 times
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