The compiler performs these optimizations

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: n ÜE · , read that memory location, and store the result in register %eax. The allowed scaling factors of 1, 2, 4, and 8 cover the sizes of the primitive data types. Practice Problem 3.17: Consider the following declarations: 144 CHAPTER 3. MACHINE-LEVEL REPRESENTATION OF C PROGRAMS short S[7]; short *T[3]; short **U[6]; long double V[8]; long double *W[4]; Fill in the following table describing the element size, the total size, and the address of element for each of these arrays. Array S T U V W Element Size Total Size Start Address ÜS ÜT ÜU ÜV ÜW Element 3.8.2 Pointer Arithmetic C allows arithmetic on pointers, where the computed value is scaled according to the size of the data type referenced by the pointer. That is, if p is a pointer to data of type Ì , and the value of p is Üp , then the expression p+i has value Üp · Ä ¡ where Ä is the size of data type Ì . The unary operators & and * allow the generation and dereferencing of pointers. That is, for an expression Expr denoting some object, &Expr is a pointer giving the address of the obj...
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