Three address instructions
. Assignment
|
. Function
|
- x = y op z
|
- param x
|
- x = op y
|
- call p,n
|
- x = y
|
- return y
|
. Jump
|
|
- goto L
|
. Pointer
|
- if x relop y goto L
|
- x = &y
|
.Indexed assignment |
- x = *y
|
- x = y[i]
|
- *x = y
|
- x[i] = y
|
|
The various types of the three-address codes. Statements can have symbolic label and there are statements for flow of control. A symbolic label represents the index of a three-address statement in the array holding intermediate code. Actual indices can be substituted for the labels either by making a separate pass, or by using backpatching.
|