pic
pic copied to clipboard
Reducible move instructions on PROGN PIC macro
Situation
A predefined PIC macro progn
is expanded into a series of let bindings. The return values of its containing expressions are bound to temporal variables, which are never referenced.
For example, the following expression:
(progn
(foo-routine)
(bar-routine))
is expanded into:
(let ((tmp (foo-routine)))
(bar-routine))
then, is compiled into:
CALL _FOO_ROUTINE
MOVWF L0
CALL _BAR_ROUTINE
Problem
The MOVWF
instruction is reducible.
Solution
Reducing the useless MOVWF
instruction.
CALL _FOO_ROUTINE
CALL _BAR_ROUTINE