* Move VFP11 scheduler description
@ 2008-08-26 18:50 Paul Brook
2008-08-28 19:43 ` Joseph S. Myers
0 siblings, 1 reply; 3+ messages in thread
From: Paul Brook @ 2008-08-26 18:50 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 436 bytes --]
The attached patch moves the VFP11 scheduler description into its own file.
No functional changes, just an aesthetic cleanup to separate generic VFP code
from the cpu specific scheduler.
Tested on arm-none-eabi
Applied to svn head.
Paul
2008-08-26 Paul Brook <paul@codesourcery.com>
* config/arm/vfp.md: Move pipeline description for VFP11 to...
* config/arm/vfp11.md: ...here. New.
* config/arm/arm.md: Include vfp11.md.
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 7244 bytes --]
Index: gcc/config/arm/vfp.md
===================================================================
--- gcc/config/arm/vfp.md (revision 139597)
+++ gcc/config/arm/vfp.md (working copy)
@@ -1,6 +1,6 @@
-;; ARM VFP coprocessor Machine Description
-;; Copyright (C) 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
-;; Written by CodeSourcery, LLC.
+;; ARM VFP instruction patterns
+;; Copyright (C) 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Written by CodeSourcery.
;;
;; This file is part of GCC.
;;
@@ -23,41 +23,6 @@ (define_constants
[(VFPCC_REGNUM 127)]
)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Pipeline description
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(define_automaton "vfp11")
-
-;; There are 3 pipelines in the VFP11 unit.
-;;
-;; - A 8-stage FMAC pipeline (7 execute + writeback) with forward from
-;; fourth stage for simple operations.
-;;
-;; - A 5-stage DS pipeline (4 execute + writeback) for divide/sqrt insns.
-;; These insns also uses first execute stage of FMAC pipeline.
-;;
-;; - A 4-stage LS pipeline (execute + 2 memory + writeback) with forward from
-;; second memory stage for loads.
-
-;; We do not model Write-After-Read hazards.
-;; We do not do write scheduling with the arm core, so it is only necessary
-;; to model the first stage of each pipeline
-;; ??? Need to model LS pipeline properly for load/store multiple?
-;; We do not model fmstat properly. This could be done by modeling pipelines
-;; properly and defining an absence set between a dummy fmstat unit and all
-;; other vfp units.
-
-(define_cpu_unit "fmac" "vfp11")
-
-(define_cpu_unit "ds" "vfp11")
-
-(define_cpu_unit "vfp_ls" "vfp11")
-
-(define_cpu_unit "fmstat" "vfp11")
-
-(exclusion_set "fmac,ds" "fmstat")
-
;; The VFP "type" attributes differ from those used in the FPA model.
;; ffarith Fast floating point insns, e.g. abs, neg, cpy, cmp.
;; farith Most arithmetic insns.
@@ -71,51 +36,6 @@ (define_cpu_unit "fmstat" "vfp11")
;; r_2_f Transfer arm to vfp reg.
;; f_cvt Convert floating<->integral
-(define_insn_reservation "vfp_ffarith" 4
- (and (eq_attr "generic_vfp" "yes")
- (eq_attr "type" "ffarith"))
- "fmac")
-
-(define_insn_reservation "vfp_farith" 8
- (and (eq_attr "generic_vfp" "yes")
- (eq_attr "type" "farith,f_cvt"))
- "fmac")
-
-(define_insn_reservation "vfp_fmul" 9
- (and (eq_attr "generic_vfp" "yes")
- (eq_attr "type" "fmul"))
- "fmac*2")
-
-(define_insn_reservation "vfp_fdivs" 19
- (and (eq_attr "generic_vfp" "yes")
- (eq_attr "type" "fdivs"))
- "ds*15")
-
-(define_insn_reservation "vfp_fdivd" 33
- (and (eq_attr "generic_vfp" "yes")
- (eq_attr "type" "fdivd"))
- "fmac+ds*29")
-
-;; Moves to/from arm regs also use the load/store pipeline.
-(define_insn_reservation "vfp_fload" 4
- (and (eq_attr "generic_vfp" "yes")
- (eq_attr "type" "f_loads,f_loadd,r_2_f"))
- "vfp_ls")
-
-(define_insn_reservation "vfp_fstore" 4
- (and (eq_attr "generic_vfp" "yes")
- (eq_attr "type" "f_stores,f_stored,f_2_r"))
- "vfp_ls")
-
-(define_insn_reservation "vfp_to_cpsr" 4
- (and (eq_attr "generic_vfp" "yes")
- (eq_attr "type" "f_flag"))
- "fmstat,vfp_ls*3")
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Insn pattern
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
;; SImode moves
;; ??? For now do not allow loading constants into vfp regs. This causes
;; problems because small constants get converted into adds.
Index: gcc/config/arm/arm.md
===================================================================
--- gcc/config/arm/arm.md (revision 139597)
+++ gcc/config/arm/arm.md (working copy)
@@ -351,6 +351,7 @@ (define_attr "generic_vfp" "yes,no"
(include "arm1136jfs.md")
(include "cortex-a8.md")
(include "cortex-r4.md")
+(include "vfp11.md")
\f
;;---------------------------------------------------------------------------
Index: gcc/config/arm/vfp11.md
===================================================================
--- gcc/config/arm/vfp11.md (revision 0)
+++ gcc/config/arm/vfp11.md (revision 139597)
@@ -0,0 +1,93 @@
+;; ARM VFP11 pipeline description
+;; Copyright (C) 2003, 2005, 2007, 2008 Free Software Foundation, Inc.
+;; Written by CodeSourcery.
+;;
+;; This file is part of GCC.
+;;
+;; GCC is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GCC is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GCC; see the file COPYING. If not, write to the Free
+;; Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+;; 02110-1301, USA. */
+
+(define_automaton "vfp11")
+
+;; There are 3 pipelines in the VFP11 unit.
+;;
+;; - A 8-stage FMAC pipeline (7 execute + writeback) with forward from
+;; fourth stage for simple operations.
+;;
+;; - A 5-stage DS pipeline (4 execute + writeback) for divide/sqrt insns.
+;; These insns also uses first execute stage of FMAC pipeline.
+;;
+;; - A 4-stage LS pipeline (execute + 2 memory + writeback) with forward from
+;; second memory stage for loads.
+
+;; We do not model Write-After-Read hazards.
+;; We do not do write scheduling with the arm core, so it is only necessary
+;; to model the first stage of each pipeline
+;; ??? Need to model LS pipeline properly for load/store multiple?
+;; We do not model fmstat properly. This could be done by modeling pipelines
+;; properly and defining an absence set between a dummy fmstat unit and all
+;; other vfp units.
+
+(define_cpu_unit "fmac" "vfp11")
+
+(define_cpu_unit "ds" "vfp11")
+
+(define_cpu_unit "vfp_ls" "vfp11")
+
+(define_cpu_unit "fmstat" "vfp11")
+
+(exclusion_set "fmac,ds" "fmstat")
+
+(define_insn_reservation "vfp_ffarith" 4
+ (and (eq_attr "generic_vfp" "yes")
+ (eq_attr "type" "ffarith"))
+ "fmac")
+
+(define_insn_reservation "vfp_farith" 8
+ (and (eq_attr "generic_vfp" "yes")
+ (eq_attr "type" "farith,f_cvt"))
+ "fmac")
+
+(define_insn_reservation "vfp_fmul" 9
+ (and (eq_attr "generic_vfp" "yes")
+ (eq_attr "type" "fmul"))
+ "fmac*2")
+
+(define_insn_reservation "vfp_fdivs" 19
+ (and (eq_attr "generic_vfp" "yes")
+ (eq_attr "type" "fdivs"))
+ "ds*15")
+
+(define_insn_reservation "vfp_fdivd" 33
+ (and (eq_attr "generic_vfp" "yes")
+ (eq_attr "type" "fdivd"))
+ "fmac+ds*29")
+
+;; Moves to/from arm regs also use the load/store pipeline.
+(define_insn_reservation "vfp_fload" 4
+ (and (eq_attr "generic_vfp" "yes")
+ (eq_attr "type" "f_loads,f_loadd,r_2_f"))
+ "vfp_ls")
+
+(define_insn_reservation "vfp_fstore" 4
+ (and (eq_attr "generic_vfp" "yes")
+ (eq_attr "type" "f_stores,f_stored,f_2_r"))
+ "vfp_ls")
+
+(define_insn_reservation "vfp_to_cpsr" 4
+ (and (eq_attr "generic_vfp" "yes")
+ (eq_attr "type" "f_flag"))
+ "fmstat,vfp_ls*3")
+
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Move VFP11 scheduler description
2008-08-26 18:50 Move VFP11 scheduler description Paul Brook
@ 2008-08-28 19:43 ` Joseph S. Myers
2008-08-29 15:13 ` Paul Brook
0 siblings, 1 reply; 3+ messages in thread
From: Joseph S. Myers @ 2008-08-28 19:43 UTC (permalink / raw)
To: Paul Brook; +Cc: gcc-patches
On Tue, 26 Aug 2008, Paul Brook wrote:
> The attached patch moves the VFP11 scheduler description into its own file.
> No functional changes, just an aesthetic cleanup to separate generic VFP code
> from the cpu specific scheduler.
You've put the old GPLv2 license notice in vfp11.md. It should have the
current GPLv3 license notice (without an FSF address).
cortex-r4.md also still has an old, non-standard license notice, as I
noted in <http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00767.html>. It's
necessary to check for these things when merging new files.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Move VFP11 scheduler description
2008-08-28 19:43 ` Joseph S. Myers
@ 2008-08-29 15:13 ` Paul Brook
0 siblings, 0 replies; 3+ messages in thread
From: Paul Brook @ 2008-08-29 15:13 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: gcc-patches
On Wednesday 27 August 2008, Joseph S. Myers wrote:
> On Tue, 26 Aug 2008, Paul Brook wrote:
> > The attached patch moves the VFP11 scheduler description into its own
> > file. No functional changes, just an aesthetic cleanup to separate
> > generic VFP code from the cpu specific scheduler.
>
> You've put the old GPLv2 license notice in vfp11.md. It should have the
> current GPLv3 license notice (without an FSF address).
I thought I'd fixed this before committing the patch, but apparently not. I've
applied the following patch which copies the license notice from arm.md.
Paul
2008-08-28 Paul Brook <paul@codesourcery.com>
* config/arm/vfp11.md: Update license notice.
* config/arm/cortex-r4.md: Ditto.
Index: gcc/config/arm/cortex-r4.md
===================================================================
--- gcc/config/arm/cortex-r4.md (revision 139716)
+++ gcc/config/arm/cortex-r4.md (working copy)
@@ -4,15 +4,19 @@
;; This file is part of GCC.
+;; GCC is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published
+;; by the Free Software Foundation; either version 3, or (at your
+;; option) any later version.
+
;; GCC is distributed in the hope that it will be useful, but WITHOUT
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
;; License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GCC; see the file COPYING. If not, write to
-;; the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GCC; see the file COPYING3. If not see
+;; <http://www.gnu.org/licenses/>.
(define_automaton "cortex_r4")
Index: gcc/config/arm/vfp11.md
===================================================================
--- gcc/config/arm/vfp11.md (revision 139716)
+++ gcc/config/arm/vfp11.md (working copy)
@@ -3,21 +3,20 @@
;; Written by CodeSourcery.
;;
;; This file is part of GCC.
-;;
+
;; GCC is free software; you can redistribute it and/or modify it
-;; under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; GCC is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-;;
+;; under the terms of the GNU General Public License as published
+;; by the Free Software Foundation; either version 3, or (at your
+;; option) any later version.
+
+;; GCC is distributed in the hope that it will be useful, but WITHOUT
+;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+;; License for more details.
+
;; You should have received a copy of the GNU General Public License
-;; along with GCC; see the file COPYING. If not, write to the Free
-;; Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
-;; 02110-1301, USA. */
+;; along with GCC; see the file COPYING3. If not see
+;; <http://www.gnu.org/licenses/>.
(define_automaton "vfp11")
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-08-28 16:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-26 18:50 Move VFP11 scheduler description Paul Brook
2008-08-28 19:43 ` Joseph S. Myers
2008-08-29 15:13 ` Paul Brook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).