From cc04440b5caa94d2bd4aaa6aab80e5343de1e144 Mon Sep 17 00:00:00 2001 From: eck Date: Tue, 13 Nov 1990 10:03:55 +0000 Subject: [PATCH] added patterns --- mach/m68020/ncg/table | 58 +++++++++++++++++++++++++++++++++++++++++++ mach/m68020/top/table | 4 +++ mach/m68k2/ncg/table | 58 +++++++++++++++++++++++++++++++++++++++++++ mach/m68k4/ncg/table | 58 +++++++++++++++++++++++++++++++++++++++++++ mach/moon3/ncg/table | 58 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 236 insertions(+) diff --git a/mach/m68020/ncg/table b/mach/m68020/ncg/table index 81e062af7..ccec3e0ea 100644 --- a/mach/m68020/ncg/table +++ b/mach/m68020/ncg/table @@ -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 diff --git a/mach/m68020/top/table b/mach/m68020/top/table index 961c4b1b2..9054d159e 100644 --- a/mach/m68020/top/table +++ b/mach/m68020/top/table @@ -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) && diff --git a/mach/m68k2/ncg/table b/mach/m68k2/ncg/table index 81e062af7..ccec3e0ea 100644 --- a/mach/m68k2/ncg/table +++ b/mach/m68k2/ncg/table @@ -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 diff --git a/mach/m68k4/ncg/table b/mach/m68k4/ncg/table index 81e062af7..ccec3e0ea 100644 --- a/mach/m68k4/ncg/table +++ b/mach/m68k4/ncg/table @@ -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 diff --git a/mach/moon3/ncg/table b/mach/moon3/ncg/table index 81e062af7..ccec3e0ea 100644 --- a/mach/moon3/ncg/table +++ b/mach/moon3/ncg/table @@ -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