The following is the resulting machine code when compiled on an ×86−64 machine with GCC, omitting tw instructions. For e
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
The following is the resulting machine code when compiled on an ×86−64 machine with GCC, omitting tw instructions. For e
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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!