Skip to content

Commit df088c1

Browse files
author
dtrg
committed
Added optimised rules for int<<8 and uint>>8 (which can be done with simple register shuffling rather than calling .sli).
1 parent 868b8c5 commit df088c1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

mach/i80/ncg/table

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,12 +728,17 @@ gen xra a
728728
mov %1.2,a
729729
mvi a,{const1,0}
730730
sbb %1.1
731-
mov %1.1,a yields %1
731+
mov %1.1,a yields %1
732732

733733
pat ngi $1==4
734734
kills ALL
735735
gen Call {label,".ngi4"}
736736

737+
pat loc sli ($1 == 8) && ($2 == 2)
738+
with hl_or_de
739+
gen move %1.2, %1.1
740+
mvi %1.2, {const1,0} yields %1
741+
737742
pat sli $1==2
738743
kills ALL
739744
gen Call {label,".sli2"} yields de
@@ -790,6 +795,11 @@ gen Call {label,".dvi4"}
790795

791796
pat slu leaving sli $1
792797

798+
pat loc sru ($1 == 8) && ($2 == 2)
799+
with hl_or_de
800+
gen move %1.1, %1.2
801+
mvi %1.1, {const1,0} yields %1
802+
793803
pat sru $1==2
794804
kills ALL
795805
uses areg={const1,0}

0 commit comments

Comments
 (0)