Java Reference
In-Depth Information
reg1
reg
intlit
+
reg2
reg3
li $reg,intlit
add $reg1,$reg2,$reg3
Figure 13.35: MIPS Instruction Patterns
=
+
*
*
A
1000
+
+
4
1
fetch
fetch
1
i
i
Figure 13.36: IR tree corresponding to A[i+1] = (1+i)*1000
22. Code generators that use IR tree pattern matching still have the problem
of allocating registers for the generated code. Suggest how an on-the-
fly register allocator can be integrated with pattern matching to form a
complete code generator.
23. Instructions like the MIPS load-immediate instruction are complicated
by the fact that the immediate operand may be too big to fit in a single
instruction. In fact immediate operands that are too big force two in-
structions to be generated: a load-upper-immediate instruction that fills
in the upper half of a word followed by an or-immediate instruction that
fills in the lower half of a word.
 
Search WWH ::




Custom Search