Section 3: Assembler
153
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
3.4.3. Instruction
Optimization
By default, both assemblers perform instruction optimizations and corrections.
This feature can be disabled with the .opt noiopt / OPT NOIOPT directive. An
instruction is optimized by replacing it with a smaller, faster instruction that has
the same functionality (e.g.,
add.l #4,d0
can be replaced with
addq #4,d0
).
Corrections are performed on instructions when one of the effective addressing
modes is incompatible with the instruction. In this case, the instruction is replaced
with a closely related instruction in order to produce legal code
(e.g.,
add.l d0,a0
must be replaced with
adda.l d0,a0
). Instructions that
are not corrected will result in an error.
The instruction optimizations and corrections are summarized in Table 3.10. As
is shown, optimizations produce faster code with exactly the same results, and
corrections produce legal code with the original code’s intent.