From e8aadf440943744fabd483ed61ba608d98775f98 Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 12 Jun 1989 14:05:25 +0000 Subject: [PATCH] some optimizations for M68881; it is still horrible, though --- mach/m68020/ncg/table | 26 ++++++++++++++++++++++++++ mach/m68k2/ncg/table | 26 ++++++++++++++++++++++++++ mach/m68k4/ncg/table | 26 ++++++++++++++++++++++++++ mach/moon3/ncg/table | 26 ++++++++++++++++++++++++++ 4 files changed, 104 insertions(+) diff --git a/mach/m68020/ncg/table b/mach/m68020/ncg/table index c4453261e..3da0a8288 100644 --- a/mach/m68020/ncg/table +++ b/mach/m68020/ncg/table @@ -4677,6 +4677,32 @@ pat cmu zge $1==4 call cmuzxx("bcc","bls") pat cmu zgt $1==4 call cmuzxx("bhi","bcs") +#if TBL68881 +proc cmf4zxx example cmf zlt +with FS_REG FS_REG + gen fcmp %1,%2 + bxx* {llabel, $2} + +pat cmf zlt $1==4 call cmf4zxx("fblt") +pat cmf zle $1==4 call cmf4zxx("fble") +pat cmf zne $1==4 call cmf4zxx("fbne") +pat cmf zeq $1==4 call cmf4zxx("fbeq") +pat cmf zge $1==4 call cmf4zxx("fbge") +pat cmf zgt $1==4 call cmf4zxx("fbgt") + +proc cmf8zxx example cmf zlt +with FD_REG FD_REG + gen fcmp %1,%2 + bxx* {llabel, $2} + +pat cmf zlt $1==8 call cmf8zxx("fblt") +pat cmf zle $1==8 call cmf8zxx("fble") +pat cmf zne $1==8 call cmf8zxx("fbne") +pat cmf zeq $1==8 call cmf8zxx("fbeq") +pat cmf zge $1==8 call cmf8zxx("fbge") +pat cmf zgt $1==8 call cmf8zxx("fbgt") +#endif + proc bxx1_in example loc loc cii loc bne with imm_cmp1 STACK gen cmp_b {const, lowb($4)}, %1 diff --git a/mach/m68k2/ncg/table b/mach/m68k2/ncg/table index c4453261e..3da0a8288 100644 --- a/mach/m68k2/ncg/table +++ b/mach/m68k2/ncg/table @@ -4677,6 +4677,32 @@ pat cmu zge $1==4 call cmuzxx("bcc","bls") pat cmu zgt $1==4 call cmuzxx("bhi","bcs") +#if TBL68881 +proc cmf4zxx example cmf zlt +with FS_REG FS_REG + gen fcmp %1,%2 + bxx* {llabel, $2} + +pat cmf zlt $1==4 call cmf4zxx("fblt") +pat cmf zle $1==4 call cmf4zxx("fble") +pat cmf zne $1==4 call cmf4zxx("fbne") +pat cmf zeq $1==4 call cmf4zxx("fbeq") +pat cmf zge $1==4 call cmf4zxx("fbge") +pat cmf zgt $1==4 call cmf4zxx("fbgt") + +proc cmf8zxx example cmf zlt +with FD_REG FD_REG + gen fcmp %1,%2 + bxx* {llabel, $2} + +pat cmf zlt $1==8 call cmf8zxx("fblt") +pat cmf zle $1==8 call cmf8zxx("fble") +pat cmf zne $1==8 call cmf8zxx("fbne") +pat cmf zeq $1==8 call cmf8zxx("fbeq") +pat cmf zge $1==8 call cmf8zxx("fbge") +pat cmf zgt $1==8 call cmf8zxx("fbgt") +#endif + proc bxx1_in example loc loc cii loc bne with imm_cmp1 STACK gen cmp_b {const, lowb($4)}, %1 diff --git a/mach/m68k4/ncg/table b/mach/m68k4/ncg/table index c4453261e..3da0a8288 100644 --- a/mach/m68k4/ncg/table +++ b/mach/m68k4/ncg/table @@ -4677,6 +4677,32 @@ pat cmu zge $1==4 call cmuzxx("bcc","bls") pat cmu zgt $1==4 call cmuzxx("bhi","bcs") +#if TBL68881 +proc cmf4zxx example cmf zlt +with FS_REG FS_REG + gen fcmp %1,%2 + bxx* {llabel, $2} + +pat cmf zlt $1==4 call cmf4zxx("fblt") +pat cmf zle $1==4 call cmf4zxx("fble") +pat cmf zne $1==4 call cmf4zxx("fbne") +pat cmf zeq $1==4 call cmf4zxx("fbeq") +pat cmf zge $1==4 call cmf4zxx("fbge") +pat cmf zgt $1==4 call cmf4zxx("fbgt") + +proc cmf8zxx example cmf zlt +with FD_REG FD_REG + gen fcmp %1,%2 + bxx* {llabel, $2} + +pat cmf zlt $1==8 call cmf8zxx("fblt") +pat cmf zle $1==8 call cmf8zxx("fble") +pat cmf zne $1==8 call cmf8zxx("fbne") +pat cmf zeq $1==8 call cmf8zxx("fbeq") +pat cmf zge $1==8 call cmf8zxx("fbge") +pat cmf zgt $1==8 call cmf8zxx("fbgt") +#endif + proc bxx1_in example loc loc cii loc bne with imm_cmp1 STACK gen cmp_b {const, lowb($4)}, %1 diff --git a/mach/moon3/ncg/table b/mach/moon3/ncg/table index c4453261e..3da0a8288 100644 --- a/mach/moon3/ncg/table +++ b/mach/moon3/ncg/table @@ -4677,6 +4677,32 @@ pat cmu zge $1==4 call cmuzxx("bcc","bls") pat cmu zgt $1==4 call cmuzxx("bhi","bcs") +#if TBL68881 +proc cmf4zxx example cmf zlt +with FS_REG FS_REG + gen fcmp %1,%2 + bxx* {llabel, $2} + +pat cmf zlt $1==4 call cmf4zxx("fblt") +pat cmf zle $1==4 call cmf4zxx("fble") +pat cmf zne $1==4 call cmf4zxx("fbne") +pat cmf zeq $1==4 call cmf4zxx("fbeq") +pat cmf zge $1==4 call cmf4zxx("fbge") +pat cmf zgt $1==4 call cmf4zxx("fbgt") + +proc cmf8zxx example cmf zlt +with FD_REG FD_REG + gen fcmp %1,%2 + bxx* {llabel, $2} + +pat cmf zlt $1==8 call cmf8zxx("fblt") +pat cmf zle $1==8 call cmf8zxx("fble") +pat cmf zne $1==8 call cmf8zxx("fbne") +pat cmf zeq $1==8 call cmf8zxx("fbeq") +pat cmf zge $1==8 call cmf8zxx("fbge") +pat cmf zgt $1==8 call cmf8zxx("fbgt") +#endif + proc bxx1_in example loc loc cii loc bne with imm_cmp1 STACK gen cmp_b {const, lowb($4)}, %1