added patterns
authoreck <none@none>
Tue, 13 Nov 1990 10:03:55 +0000 (10:03 +0000)
committereck <none@none>
Tue, 13 Nov 1990 10:03:55 +0000 (10:03 +0000)
mach/m68020/ncg/table
mach/m68020/top/table
mach/m68k2/ncg/table
mach/m68k4/ncg/table
mach/moon3/ncg/table

index 81e062a..ccec3e0 100644 (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
index 961c4b1..9054d15 100644 (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) &&
index 81e062a..ccec3e0 100644 (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
index 81e062a..ccec3e0 100644 (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
index 81e062a..ccec3e0 100644 (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