Question: A. Which registers are used to hold program values x, y, and n? B. How has the compiler eliminated the need for pointer variable p


A. Which registers are used to hold program values x, y, and n?
B. How has the compiler eliminated the need for pointer variable p and the pointer dereferencing implied by the expression (*p)+=5?
C. Add annotations to the assembly code describing the operation of the program, similar to those shown in Figure 3.19(c).
Figure 3.19(c)Â

For the C code short dw_loop (short x) { short y = x/9; short *p=&x; short do { } n 4*x; = x += y; (*p) += 5; n = 2; while (n > 0); return x; GCC generates the following assembly code:
Step by Step Solution
3.35 Rating (158 Votes )
There are 3 Steps involved in it
The code generated when compiling loops can be tricky to analyze because the compiler can perform ma... View full answer
Get step-by-step solutions from verified subject matter experts
