OSDN Git Service

* config/rs6000/rs6000.c (rs6000_override_options): Add
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Dec 2001 23:14:45 +0000 (23:14 +0000)
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Dec 2001 23:14:45 +0000 (23:14 +0000)
        SUBSUBTARGET_OVERRIDE_OPTIONS.

        * config/rs6000/eabialtivec.h: New file.

* config/rs6000/linuxaltivec.h: New file.

* config.gcc: Add powerpc-*-eabialtivec and
powerpc-*-linux-gnualtivec.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47981 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config.gcc
gcc/config/rs6000/eabialtivec.h [new file with mode: 0644]
gcc/config/rs6000/linuxaltivec.h [new file with mode: 0644]
gcc/config/rs6000/rs6000.c

index 48d94fb..dfb9eff 100644 (file)
@@ -1,3 +1,15 @@
+2001-12-12  Aldy Hernandez  <aldyh@redhat.com>
+
+        * config/rs6000/rs6000.c (rs6000_override_options): Add
+        SUBSUBTARGET_OVERRIDE_OPTIONS.
+
+        * config/rs6000/eabialtivec.h: New file.
+
+       * config/rs6000/linuxaltivec.h: New file.
+
+       * config.gcc: Add powerpc-*-eabialtivec and
+       powerpc-*-linux-gnualtivec.
+
 2001-12-13  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * toplev.c (process_options, parse_options_and_default_flags):
index 0522dde..ab25361 100644 (file)
@@ -2703,6 +2703,12 @@ powerpc-*-elf*)
        tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
        extra_headers=ppc-asm.h
        ;;
+powerpc-*-eabialtivec*)
+       xm_defines=POSIX
+       tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabialtivec.h"
+       tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
+       extra_headers=ppc-asm.h
+       ;;
 powerpc-*-eabi*)
        xm_defines=POSIX
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h"
@@ -2727,6 +2733,15 @@ powerpc-*-linux*libc1)
                thread_file='posix'
        fi
        ;;
+powerpc-*-linux-gnualtivec*)
+       tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h"
+       out_file=rs6000/rs6000.c
+       tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
+       extra_headers=ppc-asm.h
+       if test x$enable_threads = xyes; then
+               thread_file='posix'
+       fi
+       ;;
 powerpc-*-linux*)
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
        out_file=rs6000/rs6000.c
diff --git a/gcc/config/rs6000/eabialtivec.h b/gcc/config/rs6000/eabialtivec.h
new file mode 100644 (file)
index 0000000..23ec8c9
--- /dev/null
@@ -0,0 +1,31 @@
+/* Core target definitions for GNU compiler
+   for PowerPC targeted systems with AltiVec support.
+   Copyright (C) 2001 Free Software Foundation, Inc.
+   Contributed by Aldy Hernandez (aldyh@redhat.com).
+
+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.  */
+
+/* Add -meabi and -maltivec to target flags.  */
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_EABI | MASK_ALTIVEC)
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (PowerPC Embedded with AltiVec)");
+
+#undef SUBSUBTARGET_OVERRIDE_OPTIONS
+#define SUBSUBTARGET_OVERRIDE_OPTIONS  rs6000_altivec_abi = 1
diff --git a/gcc/config/rs6000/linuxaltivec.h b/gcc/config/rs6000/linuxaltivec.h
new file mode 100644 (file)
index 0000000..b5f541d
--- /dev/null
@@ -0,0 +1,30 @@
+/* Definitions of target machine for GNU compiler,
+   for AltiVec enhanced PowerPC machines running GNU/Linux.
+   Copyright (C) 2001 Free Software Foundation, Inc.
+   Contributed by Aldy Hernandez (aldyh@redhat.com).
+
+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.  */
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (PowerPC AltiVec GNU/Linux)");
+
+/* Override rs6000.h and sysv4.h definition.  */
+#undef TARGET_DEFAULT
+#define        TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_ALTIVEC)
+
+#undef SUBSUBTARGET_OVERRIDE_OPTIONS   rs6000_altivec_abi = 1
index d801ab6..532ac9b 100644 (file)
@@ -508,6 +508,9 @@ rs6000_override_options (default_cpu)
 #ifdef SUBTARGET_OVERRIDE_OPTIONS
   SUBTARGET_OVERRIDE_OPTIONS;
 #endif
+#ifdef SUBSUBTARGET_OVERRIDE_OPTIONS
+  SUBSUBTARGET_OVERRIDE_OPTIONS;
+#endif
 
   /* Set TARGET_AIX_STRUCT_RET last, after the ABI is determined.
      If -maix-struct-return or -msvr4-struct-return was explicitly