ack/util/opt/patterns

577 lines
20 KiB
Plaintext
Raw Normal View History

"$Header$"
1984-05-17 13:42:36 +00:00
loc adi loc sbi $2==w && $4==w: loc $1-$3 adi w
1986-09-23 09:41:47 +00:00
inc dec:
inc loc adi $3==w: loc $2+1 adi w
inc loc sbi $3==w: loc $2-1 sbi w
dec loc adi $3==w: loc $2-1 adi w
dec loc sbi $3==w: loc $2+1 sbi w
1984-05-17 13:42:36 +00:00
ldc adi ldc sbi $2==2*w && $4==2*w: ldc $1-$3 adi 2*w
loc adi loc adi $2==w && $4==w: loc $1+$3 adi w
ldc adi ldc adi $2==2*w && $4==2*w: ldc $1+$3 adi 2*w
loc adi loc mli $2==w && $4==w: loc $3 mli w loc $1*$3 adi w
loc adi loc sli $2==w && $4==w && $3==1: loc $3 sli w loc 2*$1 adi w
1984-05-17 13:42:36 +00:00
adp $1==0:
adp adp : adp $1+$2
adp lof : lof $1+$2
adp ldf : ldf $1+$2
adp loi $1!=0 && $2==w: lof $1
adp loi $1!=0 && $2==2*w: ldf $1
adp stf : stf $1+$2
adp sdf : sdf $1+$2
adp sti $1!=0 && $2==w: stf $1
adp sti $1!=0 && $2==2*w: sdf $1
asp $1==0:
asp asp : asp $1+$2
blm $1==0 : asp 2*p
cmi zeq $1==w: beq $2
cmi zge $1==w: bge $2
cmi zgt $1==w: bgt $2
cmi zle $1==w: ble $2
cmi zlt $1==w: blt $2
cmi zne $1==w: bne $2
1986-09-23 09:41:47 +00:00
cmu zeq $1==w: beq $2
cmu zne $1==w: bne $2
1984-05-17 13:42:36 +00:00
dvi ngi $1==$2: ngi $1 dvi $1
lae adp : lae $1+$2
lae blm $2==w: loi w ste $1
lae blm $2==2*w: loi 2*w sde $1
lae ldf : lde $1+$2
lae lof : loe $1+$2
lae loi $2==w: loe $1
lae loi $2==2*w: lde $1
#ifdef INT
lae loi loe $3==$1-w && $2%w==0: lae $3 loi $2+w
lae loi lde $3==$1-2*w && $2%w==0: lae $3 loi $2+2*w
lae loi lae loi $1==$3+$4 && $2%w==0 && $4%w==0: lae $3 loi $2+$4
lae sti ste $3==$1+$2: lae $1 sti $2+w
lae sti sde $3==$1+$2: lae $1 sti $2+2*w
lae sti loc ste $4==$1-w: loc $3 lae $4 sti $2+w
lae sti lol ste $4==$1-w: lol $3 lae $4 sti $2+w
#endif
lae lae blm loe ste $4==$1+$3 && $5==$2+$3: lae $1 lae $2 blm $3+w
lae lae blm lde sde $4==$1+$3 && $5==$2+$3: lae $1 lae $2 blm $3+2*w
lae lae blm lae lae blm $4==$1+$3 && $5==$2+$3: lae $1 lae $2 blm $3+$6
lae lal blm lae lal blm $4==$1+$3 && $5==$2+$3 && samesign($2,$5):
lae $1 lal $2 blm $3+$6
lal lae blm lal lae blm $4==$1+$3 && $5==$2+$3 && samesign($1,$4):
lal $1 lae $2 blm $3+$6
lal lal blm lal lal blm $4==$1+$3 && $5==$2+$3 && samesign($1,$4) && samesign($2,$5):
lal $1 lal $2 blm $3+$6
lal lal sbs $3==w && samesign($1,$2): loc $1-$2
lae sdf : sde $1+$2
lae stf : ste $1+$2
lae sti $2==w: ste $1
lae sti $2==2*w: sde $1
lal adp samesign($1,$1+$2): lal $1+$2
lal blm $2==w: loi w stl $1
lal blm $2==2*w: loi 2*w sdl $1
#ifdef INT
lal sti loc stl notreg($4) && $4==$1-w && samesign($1,$4):
loc $3 lal $4 sti $2+w
lal sti loe stl notreg($4) && $4==$1-w && samesign($1,$4):
loe $3 lal $4 sti $2+w
#endif
lal ldf samesign($1,$1+$2): ldl $1+$2
lal lof samesign($1,$1+$2): lol $1+$2
lal loi $2==w: lol $1
lal loi $2==2*w: ldl $1
#ifdef INT
lal loi lol notreg($3) && $3==$1-w && samesign($1,$3) && $2%w==0:
lal $3 loi $2+w
lal loi ldl notreg($3) && $3==$1-2*w && samesign($1,$3) && $2%w==0:
lal $3 loi $2+2*w
lal loi lal loi $1==$3+$4 && samesign($1,$3) && $2%w==0 && $4%w==0:
lal $3 loi $2+$4
lal sti stl notreg($3) && $3==$1+$2 && samesign($1,$3): lal $1 sti $2+w
lal sti sdl notreg($3) && $3==$1+$2 && samesign($1,$3): lal $1 sti $2+2*w
#endif
lal sdf samesign($1,$1+$2): sdl $1+$2
lal stf samesign($1,$1+$2): stl $1+$2
lal sti $2==w: stl $1
lal sti $2==2*w: sdl $1
#ifdef INT
lde lde $2==$1-2*w: lae $2 loi 4*w
lde loe $2==$1-w: lae $2 loi 3*w
#endif
lde sde $2==$1:
lde sde lde sde $3==$1+2*w && $4==$2+2*w: lae $1 lae $2 blm 4*w
#ifdef INT
ldl ldl $2==$1-2*w && notreg($1) && notreg($2) && samesign($1,$2):
lal $2 loi 4*w
ldl lol $2==$1-w && notreg($1) && notreg($2) && samesign($1,$2):
lal $2 loi 3*w
#endif
ldl sdl $1==$2:
lxa loi lxa sti $3==$1 && $4==$2:
lxa lof lxa stf $3==$1 && $4==$2:
lxa ldf lxa sdf $3==$1 && $4==$2:
lxa stf lxa lof $1>1 && $3==$1 && $4==$2: dup w lxa $1 stf $2
lxa sdf lxa ldf $1>1 && $3==$1 && $4==$2: dup 2*w lxa $1 sdf $2
1984-05-17 13:42:36 +00:00
lxl lof lxl stf $3==$1 && $4==$2:
lxl ldf lxl sdf $3==$1 && $4==$2:
lxl stf lxl lof $1>1 && $3==$1 && $4==$2: dup w lxl $1 stf $2
lxl sdf lxl ldf $1>1 && $3==$1 && $4==$2: dup 2*w lxl $1 sdf $2
lxa sti lxa loi $1>1 && $3==$1 && $4==$2 && $2%w==0: dup $2 lxa $1 sti $2
1984-05-17 13:42:36 +00:00
loc adi $1==-1 && $2==w: dec
loc dec sfit($1-1,8*w) : loc $1-1
loc bgt $1==-1: zge $2
loc ble $1==-1: zlt $2
loc dvi $1==-1 && $2==w: ngi w
ldc dvi $1==-1 && $2==2*w: ngi 2*w
loc loe adi $1==-1 && $3==w: loe $2 dec
loc lol adi $1==-1 && $3==w: lol $2 dec
loc mli $1==-1 && $2==w: ngi w
ldc mli $1==-1 && $2==2*w: ngi 2*w
loc sbi $1==-1 && $2==w: inc
loc inc sfit($1+1,8*w) : loc $1+1
loc adi $1==0 && $2==w:
ldc adi $1==0 && $2==2*w:
1988-03-23 16:52:23 +00:00
loc adu $1==0 && $2==w:
ldc adu $1==0 && $2==2*w:
loc ads $1==0 && $2==w:
ldc ads $1==0 && $2==2*w:
1984-05-17 13:42:36 +00:00
zer adi $1==$2:
loc beq $1==0: zeq $2
loc bge $1==0: zge $2
loc bgt $1==0: zgt $2
loc ble $1==0: zle $2
loc blt $1==0: zlt $2
loc bne $1==0: zne $2
loc cmi teq $1==0 && $2==w: teq
loc cmi tge $1==0 && $2==w: tge
loc cmi tgt $1==0 && $2==w: tgt
loc cmi tle $1==0 && $2==w: tle
loc cmi tlt $1==0 && $2==w: tlt
loc cmi tne $1==0 && $2==w: tne
loc cmu teq $1==0 && $2==w: teq
loc cmu tne $1==0 && $2==w: tne
loc cmu zeq $1==0 && $2==w: zeq $3
loc cmu zne $1==0 && $2==w: zne $3
1984-05-17 13:42:36 +00:00
loc ior $1==0 && $2==w:
ldc ior $1==0 && $2==2*w:
zer ior $1==$2:
loc ste $1==0: zre $2
loc stl $1==0: zrl $2
loc sbi $1==0 && $2==w:
ldc sbi $1==0 && $2==2*w:
1988-03-23 16:52:23 +00:00
loc sbu $1==0 && $2==w:
ldc sbu $1==0 && $2==2*w:
1984-05-17 13:42:36 +00:00
zer sbi $1==$2:
1988-03-23 16:52:23 +00:00
zer sbu $1==$2:
1984-05-17 13:42:36 +00:00
loc xor $1==0 && $2==w:
ldc xor $1==0 && $2==2*w:
zer xor $1==$2:
loc adi $1==1 && $2==w: inc
loc bge $1==1: zgt $2
loc blt $1==1: zle $2
loc dvi $1==1 && $2==w:
ldc dvi $1==1 && $2==2*w:
loc dvu $1==1 && $2==w:
1987-01-15 17:36:26 +00:00
ldc dvu $1==1 && $2==2*w:
1984-05-17 13:42:36 +00:00
loc loe adi $1==1 && $3==w: loe $2 inc
loc lol adi $1==1 && $3==w: lol $2 inc
loc mli $1==0 && $2==w: asp w loc 0
ldc mli $1==0 && $2==2*w: asp 2*w ldc 0
loc mlu $1==0 && $2==w: asp w loc 0
ldc mlu $1==0 && $2==2*w: asp 2*w ldc 0
1984-05-17 13:42:36 +00:00
loc mli $1==1 && $2==w:
ldc mli $1==1 && $2==2*w:
loc mlu $1==1 && $2==w:
ldc mlu $1==1 && $2==2*w:
1984-05-17 13:42:36 +00:00
loc sbi $1==1 && $2==w: dec
loc loe mlu $3==w: loe $2 loc $1 mlu w
loc lol mlu $3==w: lol $2 loc $1 mlu w
ldc lde mlu $3==2*w: lde $2 ldc $1 mlu 2*w
ldc ldl mlu $3==2*w: ldl $2 ldc $1 mlu 2*w
1984-05-17 13:42:36 +00:00
loc loe mli $3==w: loe $2 loc $1 mli w
1986-09-23 09:41:47 +00:00
loc loe adi loc $3==w: loe $2 loc $1 adi w loc $4
loc loe adi inc $3==w: loe $2 loc $1 adi w inc
loc loe adi dec $3==w: loe $2 loc $1 adi w dec
1984-05-17 13:42:36 +00:00
loc lol mli $3==w: lol $2 loc $1 mli w
1986-09-23 09:41:47 +00:00
loc lol adi loc $3==w: lol $2 loc $1 adi w loc $4
1987-01-15 17:36:26 +00:00
loc lol adi inc $3==w: lol $2 loc $1 adi w inc
1986-09-23 09:41:47 +00:00
loc lol adi dec $3==w: lol $2 loc $1 adi w dec
1984-05-17 13:42:36 +00:00
ldc lde mli $3==2*w: lde $2 ldc $1 mli 2*w
1987-02-23 11:01:13 +00:00
ldc lde adi ldc $3==2*w: lde $2 ldc $1 adi 2*w ldc $4
1984-05-17 13:42:36 +00:00
ldc ldl mli $3==2*w: ldl $2 ldc $1 mli 2*w
1987-02-23 11:01:13 +00:00
ldc ldl adi ldc $3==2*w: ldl $2 ldc $1 adi 2*w ldc $4
1984-05-17 13:42:36 +00:00
loc mli $1==2 && $2==w: loc 1 sli w
loc mli $1==4 && $2==w: loc 2 sli w
loc mli $1==8 && $2==w: loc 3 sli w
loc mli $1==16 && $2==w: loc 4 sli w
loc mli $1==32 && $2==w: loc 5 sli w
loc mli $1==64 && $2==w: loc 6 sli w
loc mli $1==128 && $2==w: loc 7 sli w
loc mli $1==256 && $2==w: loc 8 sli w
loc mlu $1==2 && $2==w: loc 1 slu w
loc mlu $1==4 && $2==w: loc 2 slu w
loc mlu $1==8 && $2==w: loc 3 slu w
loc mlu $1==16 && $2==w: loc 4 slu w
loc mlu $1==32 && $2==w: loc 5 slu w
loc mlu $1==64 && $2==w: loc 6 slu w
loc mlu $1==128 && $2==w: loc 7 slu w
loc mlu $1==256 && $2==w: loc 8 slu w
1984-05-17 13:42:36 +00:00
loc adi !defined($2): adi $1
loc sbi !defined($2): sbi $1
loc mli !defined($2): mli $1
loc dvi !defined($2): dvi $1
loc rmi !defined($2): rmi $1
loc ngi !defined($2): ngi $1
loc sli !defined($2): sli $1
loc sri !defined($2): sri $1
loc adu !defined($2): adu $1
loc sbu !defined($2): sbu $1
loc mlu !defined($2): mlu $1
loc dvu !defined($2): dvu $1
loc rmu !defined($2): rmu $1
loc slu !defined($2): slu $1
loc sru !defined($2): sru $1
loc adf !defined($2): adf $1
loc sbf !defined($2): sbf $1
loc mlf !defined($2): mlf $1
loc dvf !defined($2): dvf $1
loc ngf !defined($2): ngf $1
loc fif !defined($2): fif $1
loc fef !defined($2): fef $1
loc zer !defined($2): zer $1
loc zrf !defined($2): zrf $1
loc los $2==w: loi $1
loc sts $2==w: sti $1
loc ads $2==w: adp $1
1986-09-24 12:17:25 +00:00
ldc ads $2==2*w && sfit($1,8*w): adp $1
1984-05-17 13:42:36 +00:00
loc ass $2==w: asp $1
loc bls $2==w: blm $1
loc dus $2==w: dup $1
loc loc cii $1==$2:
loc loc cuu $1==$2:
loc loc cff $1==$2:
loc and !defined($2): and $1
loc ior !defined($2): ior $1
loc xor !defined($2): xor $1
loc com !defined($2): com $1
loc rol !defined($2): rol $1
loc rol $1==0:
loc ror !defined($2): ror $1
loc ror $1==0:
loc inn !defined($2): inn $1
loc set !defined($2): set $1
loc cmi !defined($2): cmi $1
loc cmu !defined($2): cmu $1
loc cmf !defined($2): cmf $1
loe dec ste $1==$3: dee $1
loe inc ste $1==$3: ine $1
loe loc mli $2==0 && $3==w: loc 0
#ifdef INT
loe loe $2==$1-w: lde $2
loe loe beq $2==$1+w: lde $1 beq $3
loe loe bge $2==$1+w: lde $1 ble $3
loe loe bgt $2==$1+w: lde $1 blt $3
loe loe ble $2==$1+w: lde $1 bge $3
loe loe blt $2==$1+w: lde $1 bgt $3
loe loe bne $2==$1+w: lde $1 bne $3
loe loe cmi $2==$1+w && $3==w: lde $1 cmi w ngi w
#endif
ngi teq $1==w: teq
ngi tge $1==w: tle
ngi tgt $1==w: tlt
ngi tle $1==w: tge
ngi tlt $1==w: tgt
ngi tne $1==w: tne
#ifdef INT
loe loe mli $2==$1+w && $3==w: lde $1 mli w
loe loe adi $2==$1+w && $3==w: lde $1 adi w
loe loe $1==$2: loe $1 dup w
#endif
loe ste $1==$2:
LLP blm $2==w: loi w sil $1
lol dec stl $1==$3: del $1
lol inc stl $1==$3: inl $1
lol loc mli $2==0 && $3==w: loc 0
LLP loi $2==w: lil $1
#ifdef INT
lol lol $2==$1-w && notreg($1) && notreg($2) && samesign($1,$2):
ldl $2
lol lol beq $2==$1+w && notreg($1) && notreg($2) && samesign($1,$2):
ldl $1 beq $3
lol lol bge $2==$1+w && notreg($1) && notreg($2) && samesign($1,$2):
ldl $1 ble $3
lol lol bgt $2==$1+w && notreg($1) && notreg($2) && samesign($1,$2):
ldl $1 blt $3
lol lol ble $2==$1+w && notreg($1) && notreg($2) && samesign($1,$2):
ldl $1 bge $3
lol lol blt $2==$1+w && notreg($1) && notreg($2) && samesign($1,$2):
ldl $1 bgt $3
lol lol bne $2==$1+w && notreg($1) && notreg($2) && samesign($1,$2):
ldl $1 bne $3
lol lol cmi $3==w && $2==$1+w && notreg($1) && notreg($2) && samesign($1,$2):
ldl $1 cmi w ngi w
lol lol mli $3==w && $2==$1+w && notreg($1) && notreg($2) && samesign($1,$2):
ldl $1 mli w
lol lol adi $3==w && $2==$1+w && notreg($1) && notreg($2) && samesign($1,$2):
ldl $1 adi w
lol lol $1==$2: lol $1 dup w
#endif
lol stl $1==$2:
LLP sti $2==w: sil $1
mli ngi $1==$2: ngi $1 mli $1
ngi adi $1==$2: sbi $1
ngf adf $1==$2: sbf $1
ngi sbi $1==$2: adi $1
ngf sbf $1==$2: adf $1
ngi ngi $1==$2:
ngf ngf $1==$2:
#ifdef INT
sde sde $2==$1+2*w: lae $1 sti 4*w
sde ste $2==$1+2*w: lae $1 sti 3*w
sde loc ste $3==$1-w: loc $2 lae $3 sti 3*w
sde lol ste $3==$1-w: lol $2 lae $3 sti 3*w
sde lde $1==$2: dup 2*w sde $1
#endif
sdf $1==0: sti 2*w
#ifdef INT
sdl sdl $2==$1+2*w && notreg($1) && notreg($2) && samesign($1,$2):
lal $1 sti 4*w
sdl stl $2==$1+2*w && notreg($1) && notreg($2) && samesign($1,$2):
lal $1 sti 3*w
sdl loc stl $3==$1-w && notreg($1) && notreg($3) && samesign($1,$3):
loc $2 lal $3 sti 3*w
sdl loe stl $3==$1-w && notreg($1) && notreg($3) && samesign($1,$3):
loe $2 lal $3 sti 3*w
sdl ldl $1==$2: dup 2*w sdl $1
ste loe $1==$2: dup w ste $1
ste ste $2==$1-w: sde $2
ste loc ste $3==$1-w: loc $2 sde $3
ste lol ste $3==$1-w: lol $2 sde $3
stl lol $1==$2: dup w stl $1
#endif
stf $1==0: sti w
sdl ldl ret $1==$2 && $3==2*w: ret 2*w
#ifdef INT
stl stl $2==$1+w && notreg($1) && notreg($2) && samesign($1,$2): sdl $1
stl loc stl $3==$1-w && notreg($1) && notreg($3) && samesign($1,$3):
loc $2 sdl $3
stl loe stl $3==$1-w && notreg($1) && notreg($3) && samesign($1,$3):
loe $2 sdl $3
#endif
stl lol ret $1==$2 && $3==w: ret w
lal sti lal loi ret $1==$3 && $2==$4 && $2==$5: ret $2
loc sbi loc sbi $2==w && $4==w: loc $1+$3 sbi w
ldc sbi ldc sbi $2==2*w && $4==2*w: ldc $1+$3 sbi 2*w
loc sbi loc adi $2==w && $4==w: loc $1-$3 sbi w
ldc sbi ldc adi $2==2*w && $4==2*w: ldc $1-$3 sbi 2*w
loc sbi loc mli $2==w && $4==w: loc $3 mli w loc $1*$3 sbi w
loc sbi loc sli $2==w && $4==w && $3==1: loc $3 sli w loc 2*$1 sbi w
1984-05-17 13:42:36 +00:00
teq teq : tne
teq tne : teq
teq zne : zeq $2
teq zeq : zne $2
tge teq : tlt
tge tne : tge
tge zeq : zlt $2
tge zne : zge $2
tgt teq : tle
tgt tne : tgt
tgt zeq : zle $2
tgt zne : zgt $2
tle teq : tgt
tle tne : tle
tle zeq : zgt $2
tle zne : zle $2
tlt teq : tge
tlt tne : tlt
tlt zeq : zge $2
tlt zne : zlt $2
tne teq : teq
tne tne : tne
tne zeq : zeq $2
tne zne : zne $2
#ifdef INT
1986-08-28 10:28:42 +00:00
loc loc loc $1==0 && $2==0 && $3==0 : zer 3*w
1984-05-17 13:42:36 +00:00
zer loc defined($1) && $2==0: zer $1+w
#endif
1988-03-23 16:52:23 +00:00
loi loc loc cui $1 < w && $2==$3 && $2==w: loi $1
1984-05-17 13:42:36 +00:00
loi loc and $1==1 && $3==w && ($2&255)==255: loi 1
1987-02-23 11:01:13 +00:00
loi loc and loc loc cii $1==1 && $4==w && $3==w && $2==255: loi $1 loc $4 loc $5 cii
1986-09-23 09:41:47 +00:00
loi loc loc cii loc and $1==1 && $2==1 && $3==w && $5==255 && $6==w: loi 1
loi loc loc cii loc cmi zeq $1==1 && $2==1 && $3==w && $5>=0 && $5<128 && $6==w: loi 1 loc $5 cmi w zeq $7
loi loc loc cii loc cmi zne $1==1 && $2==1 && $3==w && $5>=0 && $5<128 && $6==w: loi 1 loc $5 cmi w zne $7
loi loc loc cii loc loc ciu loc and $1==1 && $2==1 && $3==w && $5==w && $6==w && $8==255 && $9==w: loi 1
1988-06-15 13:15:41 +00:00
loc and LEP sti $1==255 && $2==w && $4==1: LEP $3 sti $4
loc and lae sti $1==255 && $2==w && $4==1: lae $3 sti $4
loc and LLP sti $1==255 && $2==w && $4==1: LLP $3 sti $4
loc and lal sti $1==255 && $2==w && $4==1: lal $3 sti $4
1984-05-17 13:42:36 +00:00
cmp teq : cms p teq
cmp tne : cms p tne
1987-04-03 16:21:24 +00:00
cmp zeq : cms p zeq $2
cmp zne : cms p zne $2
1984-05-17 13:42:36 +00:00
cmu teq defined($1): cms $1 teq
cmu tne defined($1): cms $1 tne
cms zeq $1==w: beq $2
cms zne $1==w: bne $2
lol lae aar adp $3==w: adp $4 lol $1 lae $2 aar w
loe lae aar adp $3==w: adp $4 loe $1 lae $2 aar w
cmi zeq defined($1): cms $1 zeq $2
1988-01-12 13:27:11 +00:00
cmu zeq defined($1): cms $1 zeq $2
1984-05-17 13:42:36 +00:00
cmi zne defined($1): cms $1 zne $2
1988-01-12 13:27:11 +00:00
cmu zne defined($1): cms $1 zne $2
#ifdef INT
1984-05-17 13:42:36 +00:00
loe inc dup ste $1==$4 && $3==w: ine $1 loe $1
loe dec dup ste $1==$4 && $3==w: dee $1 loe $1
lol inc dup stl $1==$4 && $3==w: inl $1 lol $1
lol dec dup stl $1==$4 && $3==w: del $1 lol $1
adp dup SEP adp $1==-$4 && $2==p: dup p adp $1 SEP $3
adp dup SLP adp $1==-$4 && $2==p: dup p adp $1 SLP $3
inc dup ste dec $2==w: dup w inc ste $3
inc dup stl dec $2==w: dup w inc stl $3
#endif
1984-05-17 13:42:36 +00:00
zeq bra lab $1==$3: zne $2 lab $1
zge bra lab $1==$3: zlt $2 lab $1
zgt bra lab $1==$3: zle $2 lab $1
zlt bra lab $1==$3: zge $2 lab $1
zle bra lab $1==$3: zgt $2 lab $1
zne bra lab $1==$3: zeq $2 lab $1
beq bra lab $1==$3: bne $2 lab $1
bge bra lab $1==$3: blt $2 lab $1
bgt bra lab $1==$3: ble $2 lab $1
blt bra lab $1==$3: bge $2 lab $1
ble bra lab $1==$3: bgt $2 lab $1
bne bra lab $1==$3: beq $2 lab $1
lin lin : lin $2
lin lab lin : lab $2 lin $3
lin ret : ret $2
lin bra : bra $2
#ifdef INT
1984-05-17 13:42:36 +00:00
dup SLP loi $1==p && $3==w: SLP $2 lil $2
dup SLP sti $1==p && $3==w: SLP $2 sil $2
#endif
1984-05-17 13:42:36 +00:00
loc cms $1==0 && $2==w: tne
zer $1==w: loc 0
loc loc adi $3==w && sfit($1+$2,8*w) : loc $1+$2
loc loc sbi $3==w && sfit($1-$2,8*w) : loc $1-$2
loc loc mli $3==w && sfit($1*$2,8*w) : loc $1*$2
loc loc dvi $3==w && $2!=0 : loc $1/$2
loc loc and $3==w : loc $1&$2
loc loc ior $3==w : loc $1|$2
loc loc ior $1==0 && $2==0 && $3==2*w :
loc loc xor $3==w : loc $1^$2
loc loc xor $1==0 && $2==0 && $3==2*w :
loc loc rol $3==w : loc rotate($1,$2)
loc loc ror $3==w : loc rotate($1,8*w-$2)
loc ngi $2==w && sfit(-$1,8*w) : loc -$1
loc com $2==w : loc ~$1
ldc ngi $2==2*w : ldc -$1
loc lae aar $3==w && $1>=rom(2,0) && $1 <= rom(2,0)+rom(2,1) :
adp ($1-rom(2,0))*rom(2,2)
loc lae lar $3==w && $1>=rom(2,0) && $1 <= rom(2,0)+rom(2,1) :
adp ($1-rom(2,0))*rom(2,2) loi rom(2,2)
loc lae sar $3==w && $1>=rom(2,0) && $1 <= rom(2,0)+rom(2,1) :
adp ($1-rom(2,0))*rom(2,2) sti rom(2,2)
loc teq : loc $1==0
loc tne : loc $1!=0
loc tge : loc $1>=0
loc tle : loc $1<=0
loc tgt : loc $1>0
loc tlt : loc $1<0
loc zeq $1==0 : bra $2
loc zeq :
loc zne $1!=0 : bra $2
loc zne :
loc zge $1>=0 : bra $2
loc zge :
loc zle $1<=0 : bra $2
loc zle :
loc zgt $1>0 : bra $2
loc zgt :
loc zlt $1<0 : bra $2
loc zlt :
loc loc beq $1==$2 : bra $3
loc loc beq :
loc loc bne $1!=$2 : bra $3
loc loc bne :
loc loc bge $1>=$2 : bra $3
loc loc bge :
loc loc ble $1<=$2 : bra $3
loc loc ble :
loc loc bgt $1>$2 : bra $3
loc loc bgt :
loc loc blt $1<$2 : bra $3
loc loc blt :
lae loi lal sti $2==$4 && $2>4*w : lae $1 lal $3 blm $2
lal loi lae sti $2==$4 && $2>4*w : lal $1 lae $3 blm $2
lal loi lal sti $2==$4 && $2>4*w && ( $3<=$1-$2 || $3>=$1+$2 ) :
lal $1 lal $3 blm $2
lae loi lae sti $2==$4 && $2>4*w && ( !defined($1==$3) || $3<=$1-$2 || $3>=$1+$2 ) :
lae $1 lae $3 blm $2
loc loc loc cif $1==0 && $2==w : zrf $3
1984-05-17 14:14:29 +00:00
loc loc loc ciu $1>=0 && $2==w && $3==2*w : ldc $1
loc loc loc cii $2==w && $3==2*w : ldc $1
1984-05-17 13:42:36 +00:00
loi loc inn $1==$3 && $2>=0 && $2<$1*8 :
lof ($2/(8*w))*w loc $2&(8*w-1) inn w
ldl loc inn $3==2*w && $2>=0 && $2<16*w :
lol $1+($2/(8*w))*w loc $2&(8*w-1) inn w
lde loc inn $3==2*w && $2>=0 && $2<16*w :
loe $1+($2/(8*w))*w loc $2&(8*w-1) inn w
ldf loc inn $3==2*w && $2>=0 && $2<16*w :
lof $1+($2/(8*w))*w loc $2&(8*w-1) inn w
loc inn $1<0 || $1>=8*$2 : asp $2 loc 0
lol loc adi stl $3==w && $1==$4 : loc $2 lol $1 adi w stl $4
1987-02-23 11:01:13 +00:00
ldl ldc adi sdl $3==2*w && $1==$4 : ldc $2 ldl $1 adi 2*w sdl $4
1984-05-17 13:42:36 +00:00
lol loe adi stl $3==w && $1==$4 : loe $2 lol $1 adi w stl $4
1987-02-23 11:01:13 +00:00
ldl lde adi sdl $3==2*w && $1==$4 : lde $2 ldl $1 adi 2*w sdl $4
1984-05-17 13:42:36 +00:00
lol lol adi stl $3==w && $1==$4 && $1!=$2 : lol $2 lol $1 adi w stl $4
1987-02-23 11:01:13 +00:00
ldl ldl adi sdl $3==2*w && $1==$4 &&$1!=$2 : ldl $2 ldl $1 adi 2*w sdl $4
1984-05-17 13:42:36 +00:00
loe loc adi ste $3==w && $1==$4 : loc $2 loe $1 adi w ste $4
1987-02-23 11:01:13 +00:00
lde ldc adi sde $3==2*w && $1==$4 : ldc $2 lde $1 adi 2*w sde $4
1984-05-17 13:42:36 +00:00
loe loe adi ste $3==w && $1==$4 && $1!=$2 : loe $2 loe $1 adi w ste $4
1987-02-23 11:01:13 +00:00
lde lde adi sde $3==2*w && $1==$4 && $1!=$2 : lde $2 lde $1 adi 2*w sde $4
1984-05-17 13:42:36 +00:00
loe lol adi ste $3==w && $1==$4 : lol $2 loe $1 adi w ste $4
1987-02-23 11:01:13 +00:00
lde ldl adi sde $3==2*w && $1==$4 : ldl $2 lde $1 adi 2*w sde $4
1984-05-17 13:42:36 +00:00
lol loc ior stl $3==w && $1==$4 : loc $2 lol $1 ior w stl $4
lol loe ior stl $3==w && $1==$4 : loe $2 lol $1 ior w stl $4
lol lol ior stl $3==w && $1==$4 && $1!=$2 : lol $2 lol $1 ior w stl $4
loe loc ior ste $3==w && $1==$4 : loc $2 loe $1 ior w ste $4
loe loe ior ste $3==w && $1==$4 && $1!=$2 : loe $2 loe $1 ior w ste $4
loe lol ior ste $3==w && $1==$4 : lol $2 loe $1 ior w ste $4
lol loc and stl $3==w && $1==$4 : loc $2 lol $1 and w stl $4
lol loe and stl $3==w && $1==$4 : loe $2 lol $1 and w stl $4
lol lol and stl $3==w && $1==$4 && $1!=$2 : lol $2 lol $1 and w stl $4
loe loc and ste $3==w && $1==$4 : loc $2 loe $1 and w ste $4
loe loe and ste $3==w && $1==$4 && $1!=$2 : loe $2 loe $1 and w ste $4
loe lol and ste $3==w && $1==$4 : lol $2 loe $1 and w ste $4
loi asp $1==$2 : asp p
lal loi loc loc loc loc ior $2==4*w && $7==4*w && ($3==0)+($4==0)+($5==0)+($6==0)>2 :
lol $1+3*w loc $3 ior w lol $1+2*w loc $4 ior w lol $1+w loc $5 ior w lol $1 loc $6 ior w
loc dup stl loc dup stl $2==2 && $5==2:
loc $1 stl $3 loc $4 stl $6 loc $1 loc $4
LLP LLP adp SLP sti $2==$4 && (!notreg($2) || $5!=p):
LLP $1 sti $5 LLP $2 adp $3 SLP $4
LEP LEP adp SEP sti $2==$4 && $5!=p:
LEP $1 sti $5 LEP $2 adp $3 SEP $4
#ifndef INT
dup stl $1==w : stl $2 lol $2
dup ste $1==w : ste $2 loe $2
dup sil $1==w : sil $2 lil $2
dup LEP sti $1==w && $3==w : LEP $2 sti w LEP $2 loi w
dup LLP stf $1==w : LLP $2 stf $3 LLP $2 lof $3
dup LEP stf $1==w : LEP $2 stf $3 LEP $2 lof $3
dup sdl $1==2*w : sdl $2 ldl $2
dup sde $1==2*w : sde $2 lde $2
dup LLP sti $1==2*w && $3==2*w : LLP $2 sti 2*w LLP $2 loi 2*w
dup LEP sti $1==2*w && $3==2*w : LEP $2 sti 2*w LEP $2 loi 2*w
dup LLP sdf $1==2*w : LLP $2 sdf $3 LLP $2 ldf $3
dup LEP sdf $1==2*w : LEP $2 sdf $3 LEP $2 ldf $3
lol dup $2==w : lol $1 lol $1
loe dup $2==w : loe $1 loe $1
lil dup $2==w : lil $1 lil $1
LEP loi dup $2==w && $3==2 : LEP $1 loi w LEP $1 loi w
ldl dup $2==2*w : ldl $1 ldl $1
lde dup $2==2*w : lde $1 lde $1
#endif
adp SLP LLP adp $1+$4==0 && $2==$3 : dup p adp $1 SLP $2
adp SEP LEP adp $1+$4==0 && $2==$3 : dup p adp $1 SEP $2
adp sil lil adp $1+$4==0 && $2==$3 && w==p : dup p adp $1 sil $2
adp LLP sti LLP loi adp $1+$6==0 && $2==$4 && $3==p && $5==p :
dup p adp $1 LLP $2 sti p
adp LEP sti LEP loi adp $1+$6==0 && $2==$4 && $3==p && $5==p :
dup p adp $1 LEP $2 sti p