Teach the i80 code generator how to do left shifts by using dad hl; prevents it
from calling out to .sli2 for simple shifts. Shrinks Star Trek from 40055 bytes to 39976.
This commit is contained in:
parent
608e386ca4
commit
b34ff2bdec
|
@ -702,14 +702,33 @@ pat ngi $1==4
|
|||
kills ALL
|
||||
gen Call {label,".ngi4"}
|
||||
|
||||
pat loc sli ($1 == 8) && ($2 == 2)
|
||||
with hl_or_de
|
||||
gen move %1.2, %1.1
|
||||
mvi %1.2, {const1,0} yields %1
|
||||
pat loc sli ($1==1) && ($2==2)
|
||||
with hlreg
|
||||
gen
|
||||
dad hl
|
||||
yields hl
|
||||
|
||||
pat loc sli ($1>=2) && ($1<=7) && ($2==2)
|
||||
with hlreg
|
||||
gen
|
||||
dad hl
|
||||
yields hl
|
||||
leaving
|
||||
loc $1-1
|
||||
sli 2
|
||||
|
||||
pat loc sli ($1==8) && ($2==2)
|
||||
with hl_or_de
|
||||
gen
|
||||
mov %1.1, %1.2
|
||||
mvi %1.2, {const1, 0}
|
||||
yields %1
|
||||
|
||||
pat sli $1==2
|
||||
kills ALL
|
||||
gen Call {label,".sli2"} yields de
|
||||
kills ALL
|
||||
gen
|
||||
Call {label,".sli2"}
|
||||
yields de
|
||||
|
||||
pat sli $1==4
|
||||
kills ALL
|
||||
|
@ -761,7 +780,14 @@ kills ALL
|
|||
gen mvi a,{const1,0}
|
||||
Call {label,".dvi4"}
|
||||
|
||||
pat slu leaving sli $1
|
||||
pat loc slu ($2==2)
|
||||
leaving
|
||||
loc $1
|
||||
sli $2
|
||||
|
||||
pat slu
|
||||
leaving
|
||||
sli $1
|
||||
|
||||
pat loc sru ($1 == 8) && ($2 == 2)
|
||||
with hl_or_de
|
||||
|
|
Loading…
Reference in a new issue