config.gcc (tm_file): Prefix pa/pa-700.h to tm_file list for PA1.0 architecture and...
authorJohn David Anglin <dave@hiauly1.hia.nrc.ca>
Fri, 31 May 2002 04:00:42 +0000 (04:00 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Fri, 31 May 2002 04:00:42 +0000 (04:00 +0000)
2002-05-30  John David Anglin  <dave@hiauly1.hia.nrc.ca>

* 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
gcc/config.gcc
gcc/config/pa/pa-700.h [new file with mode: 0644]
gcc/config/pa/pa-7100.h [new file with mode: 0644]
gcc/config/pa/pa.c
gcc/config/pa/pa.h
gcc/doc/install.texi

index 675193a56f4ff9c0591eed67d5c40ff2488c5a5b..075dc00bb4cda2bcc7ef6bb0fa098f167fead2a3 100644 (file)
@@ -1,3 +1,14 @@
+2002-05-30  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+       * 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  <dave@hiauly1.hia.nrc.ca>
 
        * pa.c (following_call): Check TARGET_JUMP_IN_DELAY.
index 8cd478fb9ab418f849b90223330314b6a084f70d..f84a425a141e7ecbda5b32d57bd0629800a57ded 100644 (file)
@@ -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 (file)
index 0000000..3529a29
--- /dev/null
@@ -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 (file)
index 0000000..7f450a4
--- /dev/null
@@ -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
index 354afd62d4b6f329d33a26a4453cf0eb149654a7..449c278b1019d57772a46408603fde0b07ee7781 100644 (file)
@@ -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);
index 0cf52a5bd22dcb71eb9564469f39a0be3094a15f..c2a6f584e1b89734ae9533ed670aeb01789b5c7a 100644 (file)
@@ -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" },\
index c84213e2664382b46a32aac9c476852927ad1c34..4aac3e18e3d705342aea262d8be6c6ed090b9c86 100644 (file)
@@ -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