

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


a) Write the appropriate save instruction to allocate stack space for the following local variables and any padding. char a; unsigned short b; char c; short d; int e; save _________ , ______________________________ , _________ (Use the formula, not an absolute value) b) Write the appropriate unoptimized SPARC assembly instructions using the above local variables. c = โAโ;
d = -9876;
e = b;
c = a;
a) Write the appropriate save instruction to allocate stack space for the following local variable declara- tion. short a[6]; save _________ , ______________________________ , _________ (Use the formula, not an absolute value) b) Write the appropriate instructions to perform the following assignment statements. a[5] = a[3];
a[2] = a[1];
short ptr; / ptr mapped to %l1 */ ptr = &a[0];
ptr++; /* ptr mapped to %l1 */
i = ptr; / i mapped to %l0; ptr to %l1 */
ptr = i; / i mapped to %l0; ptr to %l1 */