added patterns

This commit is contained in:
eck 1990-11-13 10:03:55 +00:00
parent ad800075eb
commit cc04440b5c
5 changed files with 236 additions and 0 deletions

View file

@ -1460,6 +1460,64 @@ pat lol del $1==$2 && inreg($1)==reg_any
killreg %a
yields %a
/* the following rules are for unsigneds, since del and inl work on ints */
pat lol loc lol adu stl $1==$3 && $3==$5 && $4==WORD_SIZE && inreg($1)==reg_any
kills regvar($1, reg_any), use_index %xreg==regvar($1, reg_any)
uses DD_REG = {LOCAL, $1}
gen add_i {const, $2}, {LOCAL, $1}
killreg %a
yields %a
pat lol loc lol adu stl $1==$3 && $3==$5 && $4==WORD_SIZE
kills all_indir, LOCAL %bd==$1
uses DD_REG = {LOCAL, $1}
gen add_i {const, $2}, {LOCAL, $1}
killreg %a
yields %a
pat lol lol loc sbu stl $1==$2 && $2==$5 && $4==WORD_SIZE && inreg($1)==reg_any
kills regvar($1, reg_any), use_index %xreg==regvar($1, reg_any)
uses DD_REG = {LOCAL, $1}
gen sub_i {const, $3}, {LOCAL, $1}
killreg %a
yields %a
pat lol lol loc sbu stl $1==$2 && $2==$5 && $4==WORD_SIZE
kills all_indir, LOCAL %bd==$1
uses DD_REG = {LOCAL, $1}
gen sub_i {const, $3}, {LOCAL, $1}
killreg %a
yields %a
pat loe loc loe adu ste $1==$3 && $3==$5 && $4==WORD_SIZE
kills posextern
uses DD_REG = {absolute_int, $1}
gen add_i {const,$2}, {absolute_int, $1}
killreg %a
yields %a
pat loe loe loc sbu ste $1==$2 && $2==$5 && $4==WORD_SIZE
kills posextern
uses DD_REG = {absolute_int, $1}
gen sub_i {const,$3}, {absolute_int, $1}
killreg %a
yields %a
pat lil loc lil adu sil $1==$3 && $3==$5 && $4==WORD_SIZE
&& inreg($1)==reg_pointer
kills allexceptcon
uses DD_REG = {indirect_int, regvar($1, reg_pointer)}
gen add_i {const, $2}, {indirect_int, regvar($1, reg_pointer)}
killreg %a
yields %a
pat lil lil loc sbu sil $1==$2 && $2==$5 && $4==WORD_SIZE
&& inreg($1)==reg_pointer
kills allexceptcon
uses DD_REG = {indirect_int, regvar($1, reg_pointer)}
gen sub_i {const, $3}, {indirect_int, regvar($1, reg_pointer)}
killreg %a
yields %a
proc lolxxstl example lol and stl
with data_int-bconst

View file

@ -66,6 +66,10 @@ move.l AREG,DREG : move.l DREG,AREG -> move.l AREG,DREG ;
move.w DREG,DREG2 : move.w DREG2,DREG -> move.w DREG,DREG2 ;
move.l AREG,AREG -> ;
move.l A,B : move.l A,B -> move.l A,B ;
move.w A,B : move.w A,B -> move.w A,B ;
move.b A,B : move.b A,B -> move.b A,B ;
/* register subsumption */
move.w DREG,A : ANY A,X
{reg_subs_allowed(ANY) &&

View file

@ -1460,6 +1460,64 @@ pat lol del $1==$2 && inreg($1)==reg_any
killreg %a
yields %a
/* the following rules are for unsigneds, since del and inl work on ints */
pat lol loc lol adu stl $1==$3 && $3==$5 && $4==WORD_SIZE && inreg($1)==reg_any
kills regvar($1, reg_any), use_index %xreg==regvar($1, reg_any)
uses DD_REG = {LOCAL, $1}
gen add_i {const, $2}, {LOCAL, $1}
killreg %a
yields %a
pat lol loc lol adu stl $1==$3 && $3==$5 && $4==WORD_SIZE
kills all_indir, LOCAL %bd==$1
uses DD_REG = {LOCAL, $1}
gen add_i {const, $2}, {LOCAL, $1}
killreg %a
yields %a
pat lol lol loc sbu stl $1==$2 && $2==$5 && $4==WORD_SIZE && inreg($1)==reg_any
kills regvar($1, reg_any), use_index %xreg==regvar($1, reg_any)
uses DD_REG = {LOCAL, $1}
gen sub_i {const, $3}, {LOCAL, $1}
killreg %a
yields %a
pat lol lol loc sbu stl $1==$2 && $2==$5 && $4==WORD_SIZE
kills all_indir, LOCAL %bd==$1
uses DD_REG = {LOCAL, $1}
gen sub_i {const, $3}, {LOCAL, $1}
killreg %a
yields %a
pat loe loc loe adu ste $1==$3 && $3==$5 && $4==WORD_SIZE
kills posextern
uses DD_REG = {absolute_int, $1}
gen add_i {const,$2}, {absolute_int, $1}
killreg %a
yields %a
pat loe loe loc sbu ste $1==$2 && $2==$5 && $4==WORD_SIZE
kills posextern
uses DD_REG = {absolute_int, $1}
gen sub_i {const,$3}, {absolute_int, $1}
killreg %a
yields %a
pat lil loc lil adu sil $1==$3 && $3==$5 && $4==WORD_SIZE
&& inreg($1)==reg_pointer
kills allexceptcon
uses DD_REG = {indirect_int, regvar($1, reg_pointer)}
gen add_i {const, $2}, {indirect_int, regvar($1, reg_pointer)}
killreg %a
yields %a
pat lil lil loc sbu sil $1==$2 && $2==$5 && $4==WORD_SIZE
&& inreg($1)==reg_pointer
kills allexceptcon
uses DD_REG = {indirect_int, regvar($1, reg_pointer)}
gen sub_i {const, $3}, {indirect_int, regvar($1, reg_pointer)}
killreg %a
yields %a
proc lolxxstl example lol and stl
with data_int-bconst

View file

@ -1460,6 +1460,64 @@ pat lol del $1==$2 && inreg($1)==reg_any
killreg %a
yields %a
/* the following rules are for unsigneds, since del and inl work on ints */
pat lol loc lol adu stl $1==$3 && $3==$5 && $4==WORD_SIZE && inreg($1)==reg_any
kills regvar($1, reg_any), use_index %xreg==regvar($1, reg_any)
uses DD_REG = {LOCAL, $1}
gen add_i {const, $2}, {LOCAL, $1}
killreg %a
yields %a
pat lol loc lol adu stl $1==$3 && $3==$5 && $4==WORD_SIZE
kills all_indir, LOCAL %bd==$1
uses DD_REG = {LOCAL, $1}
gen add_i {const, $2}, {LOCAL, $1}
killreg %a
yields %a
pat lol lol loc sbu stl $1==$2 && $2==$5 && $4==WORD_SIZE && inreg($1)==reg_any
kills regvar($1, reg_any), use_index %xreg==regvar($1, reg_any)
uses DD_REG = {LOCAL, $1}
gen sub_i {const, $3}, {LOCAL, $1}
killreg %a
yields %a
pat lol lol loc sbu stl $1==$2 && $2==$5 && $4==WORD_SIZE
kills all_indir, LOCAL %bd==$1
uses DD_REG = {LOCAL, $1}
gen sub_i {const, $3}, {LOCAL, $1}
killreg %a
yields %a
pat loe loc loe adu ste $1==$3 && $3==$5 && $4==WORD_SIZE
kills posextern
uses DD_REG = {absolute_int, $1}
gen add_i {const,$2}, {absolute_int, $1}
killreg %a
yields %a
pat loe loe loc sbu ste $1==$2 && $2==$5 && $4==WORD_SIZE
kills posextern
uses DD_REG = {absolute_int, $1}
gen sub_i {const,$3}, {absolute_int, $1}
killreg %a
yields %a
pat lil loc lil adu sil $1==$3 && $3==$5 && $4==WORD_SIZE
&& inreg($1)==reg_pointer
kills allexceptcon
uses DD_REG = {indirect_int, regvar($1, reg_pointer)}
gen add_i {const, $2}, {indirect_int, regvar($1, reg_pointer)}
killreg %a
yields %a
pat lil lil loc sbu sil $1==$2 && $2==$5 && $4==WORD_SIZE
&& inreg($1)==reg_pointer
kills allexceptcon
uses DD_REG = {indirect_int, regvar($1, reg_pointer)}
gen sub_i {const, $3}, {indirect_int, regvar($1, reg_pointer)}
killreg %a
yields %a
proc lolxxstl example lol and stl
with data_int-bconst

View file

@ -1460,6 +1460,64 @@ pat lol del $1==$2 && inreg($1)==reg_any
killreg %a
yields %a
/* the following rules are for unsigneds, since del and inl work on ints */
pat lol loc lol adu stl $1==$3 && $3==$5 && $4==WORD_SIZE && inreg($1)==reg_any
kills regvar($1, reg_any), use_index %xreg==regvar($1, reg_any)
uses DD_REG = {LOCAL, $1}
gen add_i {const, $2}, {LOCAL, $1}
killreg %a
yields %a
pat lol loc lol adu stl $1==$3 && $3==$5 && $4==WORD_SIZE
kills all_indir, LOCAL %bd==$1
uses DD_REG = {LOCAL, $1}
gen add_i {const, $2}, {LOCAL, $1}
killreg %a
yields %a
pat lol lol loc sbu stl $1==$2 && $2==$5 && $4==WORD_SIZE && inreg($1)==reg_any
kills regvar($1, reg_any), use_index %xreg==regvar($1, reg_any)
uses DD_REG = {LOCAL, $1}
gen sub_i {const, $3}, {LOCAL, $1}
killreg %a
yields %a
pat lol lol loc sbu stl $1==$2 && $2==$5 && $4==WORD_SIZE
kills all_indir, LOCAL %bd==$1
uses DD_REG = {LOCAL, $1}
gen sub_i {const, $3}, {LOCAL, $1}
killreg %a
yields %a
pat loe loc loe adu ste $1==$3 && $3==$5 && $4==WORD_SIZE
kills posextern
uses DD_REG = {absolute_int, $1}
gen add_i {const,$2}, {absolute_int, $1}
killreg %a
yields %a
pat loe loe loc sbu ste $1==$2 && $2==$5 && $4==WORD_SIZE
kills posextern
uses DD_REG = {absolute_int, $1}
gen sub_i {const,$3}, {absolute_int, $1}
killreg %a
yields %a
pat lil loc lil adu sil $1==$3 && $3==$5 && $4==WORD_SIZE
&& inreg($1)==reg_pointer
kills allexceptcon
uses DD_REG = {indirect_int, regvar($1, reg_pointer)}
gen add_i {const, $2}, {indirect_int, regvar($1, reg_pointer)}
killreg %a
yields %a
pat lil lil loc sbu sil $1==$2 && $2==$5 && $4==WORD_SIZE
&& inreg($1)==reg_pointer
kills allexceptcon
uses DD_REG = {indirect_int, regvar($1, reg_pointer)}
gen sub_i {const, $3}, {indirect_int, regvar($1, reg_pointer)}
killreg %a
yields %a
proc lolxxstl example lol and stl
with data_int-bconst