Lc0 pointer to string x x call scanf diagram stack

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: entry is 4 bytes) value of variable xi (in register %eax). In the assembly code, the jump table is indicated by the following declarations, to which we have added comments: 1 2 3 4 5 6 7 8 9 10 .section .rodata .align 4 .L10: .long .L4 .long .L9 .long .L5 .long .L6 .long .L8 .long .L9 .long .L8 Align address to multiple of 4 Case Case Case Case Case Case Case 100: 101: 102: 103: 104: 105: 106: loc_A loc_def loc_B loc_C loc_D loc_def loc_D These declarations state that within the segment of the object code file called “.rodata” (for “Read-Only Data”), there should be a sequence of seven “long” (4-byte) words, where the value of each word is given by the instruction address associated with the indicated assembly code labels (e.g., .L4). Label .L10 marks the start of this allocation. The address associated with this label serves as the base for the indirect jump (instruction 4). The code blocks starting with labels loc_A through loc_D and loc_def in switch_eg_impl (Figure 3.14(b)) implement the five differe...
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