Suppose variable r of type struct rec ∗ is in register \%rdi. Also assume sizeof(int) =4 and there is no padding in the
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Suppose variable r of type struct rec ∗ is in register \%rdi. Also assume sizeof(int) =4 and there is no padding in the
Suppose variable r of type struct rec ∗ is in register \%rdi. Also assume sizeof(int) =4 and there is no padding in the structure. Which one of the following sequences of assembly instructions copies element r−>i to element r−>j ? a. leaq (\%rdi), \%eax ; movl \%eax, 4 (\%rdi) b. movl \%rdi, \%eax ; movl \%eax, 4(% rdi) c. leaq 4 (\%rdi), \%eax ; movl \%eax, (\%rdi) d. movl 4(\%rdi), \%eax ; movl \%eax, (\%rdi) e. movl (\%rdi), \%eax ; movl \%eax, 4 (\%rdi) f. movl (\%rdi), \%eax ; movl \%eax, 8(% rdi)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!