Convert your three-address code from Exercise 8.6.1 into machine code, using the simple code-generation algorithm of this section, assuming three registers are available. Show the register and address descriptors after each step.
Exercise 8.6.1
For each of the following C assignment statementsa) x = a + b*c;b) x = a/(b+c) - d*(e+f);c) x = a[i] + 1;d) a [ i ] = b [ c [i]] ;e) a[i][j ] = b[i][k ] + c[k][j];f) *p++ = *q++;generate three-address code, assuming that all array elements are integers taking four bytes each. In parts (d) and (e), assume that a, b, and c are constants giving the location of the first (Oth) elements of the arrays with those names, as in all previous examples of array accesses in this chapter.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here