Solutions to practice problems codeecfsnoozec b9

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: t the maximum case label is ¾ · . 3. In the jump table, we see that the second entry (case label ½) has the same destination (.L10) as the jump instruction on line 4, indicating the default case behavior. Thus, case label ½ is missing in the switch statement body. 4. In the jump table, we see that the fifth and sixth entries have the same destination. These correspond to case labels ¾ and ¿. From this reasoning we conclude: A. The case labels in the switch statement body had values ¾, ¼, ½, ¾, ¿, and . B. The case with destination .L8 had labels ¾ and ¿. Problem 3.14 Solution: [Pg. 135] This is another example of an assembly code idiom. At first it seems quite peculiar—a call instruction with no matching ret. Then we realize that it is not really a procedure call after all. A. %eax is set to the address of the popl instruction. B. This is not a true subroutine call, since the control follows the same ordering as the instructions and the return address is popped from the stack. C. This is the only way in IA32 to get the value of the pr...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online