Convert your three-address code from Exercise 8.6.1 into machine code for the machine model of this section. You may use as many registers as you need. Exercise 8.6.1 For each of the following C...


Convert your three-address code from Exercise 8.6.1 into machine code for the machine model of this section. You may use as many registers as you need.


Exercise 8.6.1


For each of the following C assignment statements

a) 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.



May 22, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here