Some more adaptions to new semantics of ncgg

This commit is contained in:
ceriel 1987-11-10 13:49:04 +00:00
parent 2f37e8d600
commit c998623932

View file

@ -410,7 +410,7 @@ uses dereg={const2,$1}
gen Call {label,".loi"} gen Call {label,".loi"}
pat los $1==2 pat los $1==2
with dereg STACK with dereg
kills ALL kills ALL
gen Call {label,".loi"} gen Call {label,".loi"}
@ -506,7 +506,6 @@ gen dad lb
mov {m},d yields de mov {m},d yields de
pat lil loc adi sil $1==$4 && $3==2 pat lil loc adi sil $1==$4 && $3==2
with STACK
uses hlreg={const2,$1}, dereg, areg uses hlreg={const2,$1}, dereg, areg
gen dad lb gen dad lb
mov e,{m} mov e,{m}
@ -554,7 +553,7 @@ gen dad lb
mov {m},e mov {m},e
pat stf pat stf
with hl_or_de STACK with hl_or_de
uses hl_or_de={const2,$1} uses hl_or_de={const2,$1}
gen dad de gen dad de
pop de pop de
@ -593,7 +592,8 @@ with label dereg hlreg
gen shld {label,%1.off+2} gen shld {label,%1.off+2}
xchg. xchg.
shld %1 shld %1
with hlreg dereg STACK with hlreg dereg
kills ALL
gen mov {m},e gen mov {m},e
inx hl inx hl
mov {m},d mov {m},d
@ -604,7 +604,8 @@ with hlreg dereg STACK
mov {m},d mov {m},d
pat sti $1<512 pat sti $1<512
with hlreg STACK with hlreg
kills ALL
uses areg={const1,$1/2}, dereg uses areg={const1,$1/2}, dereg
gen 1: gen 1:
pop de pop de
@ -621,12 +622,13 @@ uses dereg={const2,$1}
gen Call {label,".sti"} gen Call {label,".sti"}
pat sts $1==2 pat sts $1==2
with dereg STACK with dereg
kills ALL kills ALL
gen Call {label,".sti"} gen Call {label,".sti"}
pat sdl pat sdl
with dereg STACK with dereg
kills ALL
uses hlreg={const2,$1} uses hlreg={const2,$1}
gen dad lb gen dad lb
mov {m},e mov {m},e
@ -639,21 +641,25 @@ gen dad lb
mov {m},d mov {m},d
pat sde pat sde
with hlreg STACK with hlreg
kills ALL
gen shld {label,$1} gen shld {label,$1}
pop hl pop hl
shld {label,$1+2} shld {label,$1+2}
with hlreg dereg STACK with hlreg dereg
kills ALL
gen shld {label,$1} gen shld {label,$1}
xchg. xchg.
shld {label,$1+2} shld {label,$1+2}
with dereg hlreg STACK with dereg hlreg
kills ALL
gen shld {label,$1+2} gen shld {label,$1+2}
xchg. xchg.
shld {label,$1} shld {label,$1}
pat sdf pat sdf
with hl_or_de STACK with hl_or_de
kills ALL
uses hl_or_de={const2,$1} uses hl_or_de={const2,$1}
gen dad de gen dad de
pop de pop de
@ -980,7 +986,7 @@ pat zer $1==2 yields {const2,0}
pat zer $1==4 yields {const2,0} {const2,0} pat zer $1==4 yields {const2,0} {const2,0}
pat zer $1<511 pat zer $1<511
with STACK kills ALL
uses reg={const1,$1/2}, hl_or_de={const2,0} uses reg={const1,$1/2}, hl_or_de={const2,0}
gen 1: gen 1:
push %b push %b
@ -988,7 +994,7 @@ gen 1:
jnz {label,1b} jnz {label,1b}
pat zer pat zer
with STACK kills ALL
uses hl_or_de={const2,$1/2}, hl_or_de={const2,0}, areg uses hl_or_de={const2,$1/2}, hl_or_de={const2,0}, areg
gen xra a gen xra a
1: 1:
@ -1137,7 +1143,7 @@ uses dereg={const2,$1}
gen Call {label,".and"} gen Call {label,".and"}
pat and !defined($1) pat and !defined($1)
with dereg STACK with dereg
kills ALL kills ALL
gen Call {label,".and"} gen Call {label,".and"}
@ -1165,7 +1171,7 @@ uses dereg={const2,$1}
gen Call {label,".ior"} gen Call {label,".ior"}
pat ior !defined($1) pat ior !defined($1)
with dereg STACK with dereg
kills ALL kills ALL
gen Call {label,".ior"} gen Call {label,".ior"}
@ -1193,7 +1199,7 @@ uses dereg={const2,$1}
gen Call {label,".xor"} gen Call {label,".xor"}
pat xor !defined($1) pat xor !defined($1)
with dereg STACK with dereg
kills ALL kills ALL
gen Call {label,".xor"} gen Call {label,".xor"}
@ -1213,12 +1219,13 @@ uses dereg={const2,$1}
gen Call {label,".com"} gen Call {label,".com"}
pat com !defined($1) pat com !defined($1)
with dereg STACK with dereg
kills ALL kills ALL
gen Call {label,".com"} gen Call {label,".com"}
pat rol $1==2 pat rol $1==2
with dereg hlreg STACK with dereg hlreg
kills ALL
uses areg uses areg
gen mov a,e gen mov a,e
ani {const1,15} ani {const1,15}
@ -1233,12 +1240,13 @@ gen mov a,e
3: yields hl 3: yields hl
pat rol $1==4 pat rol $1==4
with dereg STACK with dereg
kills ALL kills ALL
gen Call {label,".rol4"} gen Call {label,".rol4"}
pat ror $1==2 pat ror $1==2
with dereg hlreg STACK with dereg hlreg
kills ALL
uses areg uses areg
gen mov a,e gen mov a,e
ani {const1,15} ani {const1,15}
@ -1258,7 +1266,7 @@ gen mov a,e
2: yields hl 2: yields hl
pat ror $1==4 pat ror $1==4
with dereg STACK with dereg
kills ALL kills ALL
gen Call {label,".ror4"} gen Call {label,".ror4"}
@ -1276,12 +1284,12 @@ uses dereg={const2,$1}
gen Call {label,".inn"} yields de gen Call {label,".inn"} yields de
pat inn !defined($1) pat inn !defined($1)
with dereg STACK with dereg
kills ALL kills ALL
gen Call {label,".inn"} yields de gen Call {label,".inn"} yields de
pat set $1==2 pat set $1==2
with dereg STACK with dereg
kills ALL kills ALL
gen Call {label,".set2"} yields de gen Call {label,".set2"} yields de
@ -1291,7 +1299,7 @@ uses dereg={const2,$1}
gen Call {label,".set"} gen Call {label,".set"}
pat set !defined($1) pat set !defined($1)
with dereg STACK with dereg
kills ALL kills ALL
gen Call {label,".set"} gen Call {label,".set"}
@ -1346,7 +1354,7 @@ pat lar defined($1)
gen Call {label,"eunimpl"} gen Call {label,"eunimpl"}
pat lar !defined($1) pat lar !defined($1)
with hl_or_de STACK with hl_or_de
kills ALL kills ALL
uses areg uses areg
gen mov a,%1.2 gen mov a,%1.2
@ -1366,7 +1374,7 @@ kills ALL
gen Call {label,"eunimpl"} gen Call {label,"eunimpl"}
pat sar !defined($1) pat sar !defined($1)
with hl_or_de STACK with hl_or_de
kills ALL kills ALL
uses areg uses areg
gen mov a,%1.2 gen mov a,%1.2
@ -1386,7 +1394,7 @@ kills ALL
gen Call {label,"eunimpl"} gen Call {label,"eunimpl"}
pat aar !defined($1) pat aar !defined($1)
with hl_or_de STACK with hl_or_de
kills ALL kills ALL
uses areg uses areg
gen mov a,%1.2 gen mov a,%1.2
@ -1450,7 +1458,7 @@ uses dereg={const2,$1}
gen Call {label,".cms"} yields de gen Call {label,".cms"} yields de
pat cms !defined($1) pat cms !defined($1)
with dereg STACK with dereg
kills ALL kills ALL
gen Call {label,".cms"} yields de gen Call {label,".cms"} yields de
@ -1831,7 +1839,7 @@ kills ALL
gen Call {label,$1} gen Call {label,$1}
pat cai pat cai
with hlreg STACK with hlreg
kills ALL kills ALL
uses dereg uses dereg
gen lxi de,{label,1f} gen lxi de,{label,1f}
@ -1943,7 +1951,7 @@ uses dereg={const2,$1}
gen Call {label,".blm"} gen Call {label,".blm"}
pat bls pat bls
with dereg STACK with dereg
kills ALL kills ALL
gen Call {label,".blm"} gen Call {label,".blm"}
@ -1969,7 +1977,7 @@ uses dereg={const2,$1}
gen Call {label,".dup"} gen Call {label,".dup"}
pat dus $1==2 pat dus $1==2
with dereg STACK with dereg
kills ALL kills ALL
gen Call {label,".dup"} gen Call {label,".dup"}