PROPERTIES
-USELESS /* Bug circumvention */
REG /* Normal registers */
FREG /* Floating point registers */
DFREG(8) /* double floating reg for double precision */
with exact LOCAL yields {memrel8, fp, %1.ind, 0}
pat loi defined($1)
-with USELESS
with REG STACK
uses REG = {const4, $1}
gen addd %a, %1
move %2, {regrel4, %1.reg, %1.disp+4}
pat sti defined($1)
-with USELESS
with REG STACK
uses REG={const4, $1}
gen 1:
gen ashd {const4, $2}, {absolute4, $1}
pat loc sri $2 == 4
-with USELESS
with REG
gen ashd {const4,0-$1}, %1 yields %1
pat sri $1 == 4
-with USELESS
with REG REG
gen negd %1, %1
ashd %1, %2 yields %2
pat slu leaving sli $1
pat loc sru $2 == 4
-with USELESS
with REG
gen lshd {const4, 0-$1}, %1 yields %1
pat sru $1 == 4
-with USELESS
with REG REG
gen negd %1, %1
lshd %1, %2 yields %2
*****************************************************************/
pat inc
-with USELESS
with REG
gen addd {const4,1}, %1 yields %1
with exact STACK
gen addd {const4,1},{absolute4, $1}
pat dec
-with USELESS
with REG
gen addd {const4,0-1}, %1 yields %1
with exact STACK
addr {regrel4, r1, 4}, r1
acbd {const4, 0-4}, r0, {label, "1b"}
+pat and !defined($1)
+with REG STACK
+uses REG
+ gen addr {memregrel4, sp, 0}, %a
+ addd %1, %a
+ 1:
+ andd {TOS}, {regrel4, %a, 0}
+ addr {regrel4, %a, 4}, %a
+ acbd {const4, 0-4}, %1, {label, "1b"}
+
pat lol ior stl $1==$3 && $2==4
with src4
kills rel, LOCAL %ind-4 < $1 && %ind+4 > $1
addr {regrel4, r1, 4}, r1
acbd {const4, 0-4}, r0, {label, "1b"}
+pat ior !defined($1)
+with REG STACK
+uses REG
+ gen addr {memregrel4, sp, 0}, %a
+ addd %1, %a
+ 1:
+ ord {TOS}, {regrel4, %a, 0}
+ addr {regrel4, %a, 4}, %a
+ acbd {const4, 0-4}, %1, {label, "1b"}
+
pat xor $1==4
with src4 REG
gen xord %1, %2 yields %2
addr {regrel4, r1, 4}, r1
acbd {const4, 0-4}, r0, {label, "1b"}
+pat xor !defined($1)
+with REG STACK
+uses REG
+ gen addr {memregrel4, sp, 0}, %a
+ addd %1, %a
+ 1:
+ xord {TOS}, {regrel4, %a, 0}
+ addr {regrel4, %a, 4}, %a
+ acbd {const4, 0-4}, %1, {label, "1b"}
+
pat com $1==4
-with USELESS
with REG
gen comd %1, %1 yields %1
addr {regrel4, r1, 4}, r1
acbd {const4, 0-4}, r0, {label, "1b"}
+pat com !defined($1)
+with REG STACK
+uses REG
+ gen addr {memregrel4, sp, 0}, %a
+ 1:
+ comd {regrel4, %a, 0}, {regrel4, %a, 0}
+ addr {regrel4, %a, 4}, %a
+ acbd {const4, 0-4}, %1, {label, "1b"}
+
pat rol $1 == 4
with src124 REG
gen rotd %1, %2 yields %2
pat loc ror $2 == 4
-with USELESS
with REG
gen rotd {const4, 0-$1}, %1 yields %1
pat ror $1 == 4
-with USELESS
with REG REG
gen negd %1, %1
rotd %1, %2 yields %2
adp 0-rom($1,1)
pat lae aar $2==2 && rom($1,3)==2 && rom($1,1)==0
-with USELESS
with REG
gen ashd {const4, 1}, %1 yields %1
leaving adi 2
pat lae aar $2==2 && rom($1,3)==2 && rom($1,1)!=0
-with USELESS
with REG
gen ashd {const4, 1}, %1 yields {regcon4, %1,(0-2)*rom($1,1)}
leaving adi 2
pat lae aar $2==4 && rom($1,3)==4 && rom($1,1)==0
-with USELESS
with REG addr_local
uses REG
gen addr {memregrelsid, %2.ind, fp, %1}, %a
with leaving lae $1 aar $2
pat lae aar $2==4 && rom($1,3)==4 && rom($1,1)!=0
-with USELESS
with REG addr_local
uses REG
gen subd {const4, rom($1,1)}, %1
with leaving lae $1 aar $2
pat lae lar $2==4 && rom($1,3)==4 && rom($1,1)==0
-with USELESS
with REG addr_local yields {memregrelsid, %2.ind, fp, %1}
with REG addr_external yields {abssid, %2.disp, %1}
with leaving lae $1 lar $2
pat lae lar $2==4 && rom($1,3)==4 && rom($1,1)!=0
-with USELESS
with REG addr_local
gen subd {const4, rom($1,1)}, %1
yields {memregrelsid, %2.ind, fp, %1}
gen indexd %2, {const4, rom($1,3)-1}, %1 yields %2
pat lae aar $2==4 && rom($1,1)!=0
-with USELESS
with REG REG
gen subd {const4,rom($1,1)}, %1
indexd %2, {const4, rom($1,3)-1}, %1 yields %2
gen jsr {absolute4, $1}
pat cai
-with USELESS
with REG STACK
gen jsr %1
gen adjspd {const4,0-$1}
pat ass $1==4
-with USELESS
with REG STACK
gen negd %1, %1
adjspd %1
pat blm $1==0
pat blm $1==4
-with USELESS
with REG REG
kills allmincon
gen move {regrel4, %2, 0}, {regrel4, %1, 0}
pat blm $1>4 && $1<=16
-with USELESS
with REG REG
kills allmincon
gen movmd %2, %1, {const4, $1}
gen movmd {LOCAL, %2.ind}, {LOCAL, %1.ind}, {const4, $1}
pat blm $1>16
-with USELESS
with REG REG
kills allmincon
uses REG={const4,$1}
acbd {const4, 0-4}, %a, {label, "1b"}
pat bls $1==4
-with USELESS
with REG
kills ALL
gen 1: