From 806bf4137dfb55d775e8e1b9040f69ac557a44ad Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Fri, 31 May 2002 04:00:42 +0000 Subject: [PATCH] config.gcc (tm_file): Prefix pa/pa-700.h to tm_file list for PA1.0 architecture and pa/pa-7100.h for... 2002-05-30 John David Anglin * config.gcc (tm_file): Prefix pa/pa-700.h to tm_file list for PA1.0 architecture and pa/pa-7100.h for PA1.1 architecture, respectively. * pa/pa.c (override_options): Use TARGET_SCHED_DEFAULT to select default scheduling model. * pa/pa.h (TARGET_SCHED_DEFAULT): Define if not defined to "8000". * pa/pa-700.h (TARGET_SCHED_DEFAULT): New file for "700" scheduling. * pa/pa-7100.h (TARGET_SCHED_DEFAULT): New file for "7100" scheduling. * doc/install.texi (hppa*-*-*): Document default scheduling. From-SVN: r54085 --- gcc/ChangeLog | 11 +++++++++++ gcc/config.gcc | 8 ++++++++ gcc/config/pa/pa-700.h | 24 ++++++++++++++++++++++++ gcc/config/pa/pa-7100.h | 24 ++++++++++++++++++++++++ gcc/config/pa/pa.c | 25 +++++++++++++------------ gcc/config/pa/pa.h | 4 ++++ gcc/doc/install.texi | 13 +++++++++++++ 7 files changed, 97 insertions(+), 12 deletions(-) create mode 100644 gcc/config/pa/pa-700.h create mode 100644 gcc/config/pa/pa-7100.h diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 675193a56f4..075dc00bb4c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2002-05-30 John David Anglin + + * config.gcc (tm_file): Prefix pa/pa-700.h to tm_file list for PA1.0 + architecture and pa/pa-7100.h for PA1.1 architecture, respectively. + * pa/pa.c (override_options): Use TARGET_SCHED_DEFAULT to select + default scheduling model. + * pa/pa.h (TARGET_SCHED_DEFAULT): Define if not defined to "8000". + * pa/pa-700.h (TARGET_SCHED_DEFAULT): New file for "700" scheduling. + * pa/pa-7100.h (TARGET_SCHED_DEFAULT): New file for "7100" scheduling. + * doc/install.texi (hppa*-*-*): Document default scheduling. + 2002-05-30 John David Anglin * pa.c (following_call): Check TARGET_JUMP_IN_DELAY. diff --git a/gcc/config.gcc b/gcc/config.gcc index 8cd478fb9ab..f84a425a141 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2805,6 +2805,14 @@ hppa*-*-* | parisc*-*-*) then target_cpu_default2="MASK_GAS|MASK_JUMP_IN_DELAY" fi + case $machine in + hppa1.0* | parisc1.0*) + tm_file="pa/pa-700.h ${tm_file}" + ;; + hppa1.1* | parisc1.1*) + tm_file="pa/pa-7100.h ${tm_file}" + ;; + esac ;; mips*-*-ecoff* | mips*-*-elf*) diff --git a/gcc/config/pa/pa-700.h b/gcc/config/pa/pa-700.h new file mode 100644 index 00000000000..3529a299e96 --- /dev/null +++ b/gcc/config/pa/pa-700.h @@ -0,0 +1,24 @@ +/* Definitions of target machine for GNU compiler, for HPs using the + PA700 scheduling model. + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC 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. + +GNU CC 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 GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#ifndef TARGET_SCHED_DEFAULT +#define TARGET_SCHED_DEFAULT "700" +#endif diff --git a/gcc/config/pa/pa-7100.h b/gcc/config/pa/pa-7100.h new file mode 100644 index 00000000000..7f450a41659 --- /dev/null +++ b/gcc/config/pa/pa-7100.h @@ -0,0 +1,24 @@ +/* Definitions of target machine for GNU compiler, for HPs using the + PA7100 scheduling model. + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC 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. + +GNU CC 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 GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#ifndef TARGET_SCHED_DEFAULT +#define TARGET_SCHED_DEFAULT "7100" +#endif diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 354afd62d4b..449c278b101 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -197,38 +197,39 @@ struct gcc_target targetm = TARGET_INITIALIZER; void override_options () { - /* Default to 8000 scheduling. */ - if (pa_cpu_string && ! strcmp (pa_cpu_string, "7100")) + if (pa_cpu_string == NULL) + pa_cpu_string = TARGET_SCHED_DEFAULT; + + if (! strcmp (pa_cpu_string, "8000")) + { + pa_cpu_string = "8000"; + pa_cpu = PROCESSOR_8000; + } + else if (! strcmp (pa_cpu_string, "7100")) { pa_cpu_string = "7100"; pa_cpu = PROCESSOR_7100; } - else if (pa_cpu_string && ! strcmp (pa_cpu_string, "700")) + else if (! strcmp (pa_cpu_string, "700")) { pa_cpu_string = "700"; pa_cpu = PROCESSOR_700; } - else if (pa_cpu_string && ! strcmp (pa_cpu_string, "7100LC")) + else if (! strcmp (pa_cpu_string, "7100LC")) { pa_cpu_string = "7100LC"; pa_cpu = PROCESSOR_7100LC; } - else if (pa_cpu_string && ! strcmp (pa_cpu_string, "7200")) + else if (! strcmp (pa_cpu_string, "7200")) { pa_cpu_string = "7200"; pa_cpu = PROCESSOR_7200; } - else if (pa_cpu_string && ! strcmp (pa_cpu_string, "7300")) + else if (! strcmp (pa_cpu_string, "7300")) { pa_cpu_string = "7300"; pa_cpu = PROCESSOR_7300; } - else if (pa_cpu_string == NULL - || ! strcmp (pa_cpu_string, "8000")) - { - pa_cpu_string = "8000"; - pa_cpu = PROCESSOR_8000; - } else { warning ("unknown -mschedule= option (%s).\nValid options are 700, 7100, 7100LC, 7200, 7300, and 8000\n", pa_cpu_string); diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 0cf52a5bd22..c2a6f584e1b 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -208,6 +208,10 @@ extern int target_flags; #define TARGET_CPU_DEFAULT 0 #endif +#ifndef TARGET_SCHED_DEFAULT +#define TARGET_SCHED_DEFAULT "8000" +#endif + #define TARGET_OPTIONS \ { \ { "schedule=", &pa_cpu_string, "Specify CPU for scheduling purposes" },\ diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index c84213e2664..4aac3e18e3d 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -1997,6 +1997,19 @@ If you wish to use pa-risc 2.0 architecture support, you must use either the HP assembler, gas/binutils 2.11 or a recent @uref{ftp://sources.redhat.com/pub/binutils/snapshots,,snapshot of gas}. +There are three default scheduling models for instructions. They +are PROCESSOR_700, PROCESSOR_7100 and PROCESSOR_8000. They are selected +based on the the pa-risc architecture specified for the target machine +when configuring. PROCESSOR_8000 is the default model. PROCESSOR_700 +and PROCESSOR_7100 are selected by specifying either @samp{hppa1.0} or +@samp{hppa1.1}, respectively. + +The PROCESSOR_8000 model is not well suited to older processors. Thus, +it is important to completely specify the machine architecture when +configuring if you want a model other than PROCESSOR_8000. The macro +TARGET_SCHED_DEFAULT can be defined in BOOT_CFLAGS if a different +default scheduling model is desired. + More specific information to @samp{hppa*-hp-hpux*} targets follows. @html -- 2.30.2