This preview shows page 1. Sign up to view the full content.
Unformatted text preview: that causes the address of the following instruction to begin on a multiple of 16, but leaving a maximum of 7 wasted bytes. This directive is intended to allow the processor to make optimal use of the instruction cache memory. The disassembled version of the “.o” format generated by the assembler is as follows:
1 2 3 4 5 6 7 8 8: a: 10: 12: 15: 17: 19: 1b: 7e 8d 89 c1 29 85 7f 89 11 b6 00 00 00 00 d0 f8 01 c2 d2 f5 d0 jle lea mov sar sub test jg mov 1b <silly+0x1b> 0x0(%esi),%esi %edx,%eax $0x1,%eax %eax,%edx %edx,%edx 10 <silly+0x10> %edx,%eax Target = dest2 Added nops dest1: Target = dest1
dest2: The “lea 0x0(%esi),%esi” instruction in line 2 has no real effect. It serves as a 6-byte nop so that the next instruction (line 3) has a starting address that is a multiple of 16. 116 CHAPTER 3. MACHINE-LEVEL REPRESENTATION OF C PROGRAMS In the annotations generated by the disassembler on the right, the jump targets are indicated explicitly as 0x1b for instruction 1 and...
View Full Document
- Spring '10
- The American