by alphaBetaGamma · 7y ago · 0 comments
E.g. instead of:
i=0
StartLoop:
i+=1
do_stuff_0
do_stuff_1
do_stuff_2
do_stuff_3
if i<N goto StartLoop
we would have: i=0
StartLoop:
i+=1
do_stuff_0
do_stuff_1
if i<N goto StartLoop in 2 instructions
do_stuff_2
do_stuff_3prepare-to-branch <jump-target> <launchpoint-label> ... launch-label: branch <jump-target>
The utility is pretty limited, but it can help for strictly in-order machines.
i=0
StartLoop:
i+=1
do_stuff_0
do_stuff_1
REG1 = i, REG2 = N
do_stuff_2
do_stuff_3
if REG1<REG2 goto StartLoop